{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "from pymongo import MongoClient\n",
    "from pandas.io.json import json_normalize\n",
    "\n",
    "plt.style.use('ggplot')\n",
    "from pylab import mpl\n",
    "mpl.rcParams['font.sans-serif'] = ['SimHei']  #解决seaborn中文字体显示问题\n",
    "plt.rc('figure', figsize=(10, 10))  #把plt默认的图片size调大一点\n",
    "plt.rcParams[\"figure.dpi\"] =mpl.rcParams['axes.unicode_minus'] = False # 解决保存图像是负号'-'显示为方块的问题\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "conn = MongoClient(host='127.0.0.1', port=27017)  # 实例化MongoClient\n",
    "db = conn.get_database('CaiXuKun')  # 连接到CaiXuKun数据库\n",
    "\n",
    "repost = db.get_collection('repost') # 连接到集合repost\n",
    "mon_data = repost.find()  # 查询这个集合下的所有记录"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = json_normalize([comment for comment in mon_data])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 102313 entries, 0 to 102312\n",
      "Data columns (total 97 columns):\n",
      "_id                                  102313 non-null object\n",
      "attitudes_count                      102313 non-null int64\n",
      "bid                                  102313 non-null object\n",
      "can_edit                             102313 non-null bool\n",
      "cardid                               1248 non-null object\n",
      "comments_count                       102313 non-null int64\n",
      "content_auth                         102313 non-null int64\n",
      "created_at                           102313 non-null object\n",
      "darwin_tags                          102313 non-null object\n",
      "edit_at                              10 non-null object\n",
      "edit_count                           10 non-null float64\n",
      "favorited                            102313 non-null bool\n",
      "hide_flag                            102313 non-null int64\n",
      "id                                   102313 non-null object\n",
      "isLongText                           102313 non-null bool\n",
      "is_imported_topic                    2 non-null object\n",
      "is_paid                              102313 non-null bool\n",
      "mblog_vip_type                       102313 non-null int64\n",
      "mblogtype                            102313 non-null int64\n",
      "mid                                  102313 non-null object\n",
      "more_info_type                       102313 non-null int64\n",
      "pending_approval_count               102313 non-null int64\n",
      "pic_ids                              102313 non-null object\n",
      "pic_types                            102313 non-null object\n",
      "pid                                  96271 non-null float64\n",
      "raw_text                             102313 non-null object\n",
      "reposts_count                        102313 non-null int64\n",
      "reward_exhibition_type               102313 non-null int64\n",
      "show_additional_indication           102313 non-null int64\n",
      "source                               102313 non-null object\n",
      "sync_mblog                           2 non-null object\n",
      "topic_id                             2 non-null object\n",
      "user.avatar_hd                       102313 non-null object\n",
      "user.badge.anniversary               12 non-null float64\n",
      "user.badge.asiad_2018                659 non-null float64\n",
      "user.badge.bind_taobao               1929 non-null float64\n",
      "user.badge.cz_wed_2017               49 non-null float64\n",
      "user.badge.dailv                     31 non-null float64\n",
      "user.badge.dailv_2018                1231 non-null float64\n",
      "user.badge.denglong_2019             185 non-null float64\n",
      "user.badge.double11_2018             3008 non-null float64\n",
      "user.badge.dzwbqlx_2016              499 non-null float64\n",
      "user.badge.follow_whitelist_video    1 non-null float64\n",
      "user.badge.fools_day_2016            30 non-null float64\n",
      "user.badge.fu_2019                   140 non-null float64\n",
      "user.badge.gongyi                    6 non-null float64\n",
      "user.badge.gongyi_level              20 non-null float64\n",
      "user.badge.hongbaofei_2019           2735 non-null float64\n",
      "user.badge.kpl_2018                  10 non-null float64\n",
      "user.badge.league_badge              22 non-null float64\n",
      "user.badge.league_badge_2018         2 non-null float64\n",
      "user.badge.lol_gm_2017               13 non-null float64\n",
      "user.badge.lol_s8                    47 non-null float64\n",
      "user.badge.meilizhongguo_2018        16 non-null float64\n",
      "user.badge.memorial_2018             3543 non-null float64\n",
      "user.badge.national_day_2018         3613 non-null float64\n",
      "user.badge.panda                     5194 non-null float64\n",
      "user.badge.qixi_2018                 4833 non-null float64\n",
      "user.badge.suishoupai_2018           3043 non-null float64\n",
      "user.badge.super_star_2017           75 non-null float64\n",
      "user.badge.super_star_2018           389 non-null float64\n",
      "user.badge.taobao                    2 non-null float64\n",
      "user.badge.travel_2017               267 non-null float64\n",
      "user.badge.uefa_euro_2016            3 non-null float64\n",
      "user.badge.unread_pool               1572 non-null float64\n",
      "user.badge.unread_pool_ext           1378 non-null float64\n",
      "user.badge.user_name_certificate     101917 non-null float64\n",
      "user.badge.vip_activity2             199 non-null float64\n",
      "user.badge.wbzy_2018                 6854 non-null float64\n",
      "user.badge.wenchuan_10th             1784 non-null float64\n",
      "user.badge.wenda_v2                  1973 non-null float64\n",
      "user.badge.womensday_2018            54 non-null float64\n",
      "user.badge.worldcup_2018             147 non-null float64\n",
      "user.badge.yiqijuan_2018             340 non-null float64\n",
      "user.badge.zongyiji                  156 non-null float64\n",
      "user.close_blue_v                    102313 non-null bool\n",
      "user.cover_image_phone               102313 non-null object\n",
      "user.description                     102313 non-null object\n",
      "user.follow_count                    102313 non-null int64\n",
      "user.follow_me                       102313 non-null bool\n",
      "user.followers_count                 102313 non-null int64\n",
      "user.following                       102313 non-null bool\n",
      "user.gender                          102313 non-null object\n",
      "user.id                              102313 non-null int64\n",
      "user.like                            102313 non-null bool\n",
      "user.like_me                         102313 non-null bool\n",
      "user.mbrank                          102313 non-null int64\n",
      "user.mbtype                          102313 non-null int64\n",
      "user.profile_image_url               102313 non-null object\n",
      "user.profile_url                     102313 non-null object\n",
      "user.screen_name                     102313 non-null object\n",
      "user.statuses_count                  102313 non-null int64\n",
      "user.urank                           102313 non-null int64\n",
      "user.verified                        102313 non-null bool\n",
      "user.verified_reason                 356 non-null object\n",
      "user.verified_type                   102313 non-null int64\n",
      "user.verified_type_ext               356 non-null float64\n",
      "dtypes: bool(10), float64(45), int64(19), object(23)\n",
      "memory usage: 68.9+ MB\n"
     ]
    }
   ],
   "source": [
    "data.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>_id</th>\n",
       "      <th>attitudes_count</th>\n",
       "      <th>bid</th>\n",
       "      <th>can_edit</th>\n",
       "      <th>cardid</th>\n",
       "      <th>comments_count</th>\n",
       "      <th>content_auth</th>\n",
       "      <th>created_at</th>\n",
       "      <th>darwin_tags</th>\n",
       "      <th>edit_at</th>\n",
       "      <th>...</th>\n",
       "      <th>user.mbtype</th>\n",
       "      <th>user.profile_image_url</th>\n",
       "      <th>user.profile_url</th>\n",
       "      <th>user.screen_name</th>\n",
       "      <th>user.statuses_count</th>\n",
       "      <th>user.urank</th>\n",
       "      <th>user.verified</th>\n",
       "      <th>user.verified_reason</th>\n",
       "      <th>user.verified_type</th>\n",
       "      <th>user.verified_type_ext</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>76462</th>\n",
       "      <td>5c85cc1af2766b0bd3eac927</td>\n",
       "      <td>0</td>\n",
       "      <td>HknmbuU4Q</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>3小时前</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>https://tvax4.sinaimg.cn/crop.0.0.640.640.180/...</td>\n",
       "      <td>https://m.weibo.cn/u/7012413636?uid=7012413636</td>\n",
       "      <td>困困的菜ICV124</td>\n",
       "      <td>33</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8855</th>\n",
       "      <td>5c84a991f2766b0bd3e75385</td>\n",
       "      <td>0</td>\n",
       "      <td>HkgoNlxW5</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>52分钟前</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>https://tvax3.sinaimg.cn/crop.0.0.640.640.180/...</td>\n",
       "      <td>https://m.weibo.cn/u/7012480301?uid=7012480301</td>\n",
       "      <td>雨露奎哥tCs622</td>\n",
       "      <td>19</td>\n",
       "      <td>1</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>78023</th>\n",
       "      <td>5c85d1c1f2766b0bd3eadd3a</td>\n",
       "      <td>0</td>\n",
       "      <td>HkoAu3MmB</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>13分钟前</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>https://tvax1.sinaimg.cn/crop.0.0.640.640.180/...</td>\n",
       "      <td>https://m.weibo.cn/u/7012731691?uid=7012731691</td>\n",
       "      <td>最酷的坤XLL749</td>\n",
       "      <td>27</td>\n",
       "      <td>3</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>88036</th>\n",
       "      <td>5c85f7a0f2766b0bd3eb4fb1</td>\n",
       "      <td>0</td>\n",
       "      <td>HkphJ57ZE</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1小时前</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>https://tvax2.sinaimg.cn/crop.0.0.640.640.180/...</td>\n",
       "      <td>https://m.weibo.cn/u/7017930638?uid=7017930638</td>\n",
       "      <td>超赞坤哥cVR094</td>\n",
       "      <td>24</td>\n",
       "      <td>3</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73676</th>\n",
       "      <td>5c85c47ef2766b0bd3eaab8a</td>\n",
       "      <td>0</td>\n",
       "      <td>HkohTnpCI</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2小时前</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>https://tvax1.sinaimg.cn/crop.0.0.1080.1080.18...</td>\n",
       "      <td>https://m.weibo.cn/u/6673451463?uid=6673451463</td>\n",
       "      <td>坤的白菜丝</td>\n",
       "      <td>32</td>\n",
       "      <td>9</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 97 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                            _id  attitudes_count        bid  can_edit cardid  \\\n",
       "76462  5c85cc1af2766b0bd3eac927                0  HknmbuU4Q     False    NaN   \n",
       "8855   5c84a991f2766b0bd3e75385                0  HkgoNlxW5     False    NaN   \n",
       "78023  5c85d1c1f2766b0bd3eadd3a                0  HkoAu3MmB     False    NaN   \n",
       "88036  5c85f7a0f2766b0bd3eb4fb1                0  HkphJ57ZE     False    NaN   \n",
       "73676  5c85c47ef2766b0bd3eaab8a                0  HkohTnpCI     False    NaN   \n",
       "\n",
       "       comments_count  content_auth created_at darwin_tags edit_at  \\\n",
       "76462               0             0       3小时前          []     NaN   \n",
       "8855                0             0      52分钟前          []     NaN   \n",
       "78023               0             0      13分钟前          []     NaN   \n",
       "88036               0             0       1小时前          []     NaN   \n",
       "73676               0             0       2小时前          []     NaN   \n",
       "\n",
       "               ...            user.mbtype  \\\n",
       "76462          ...                      0   \n",
       "8855           ...                      0   \n",
       "78023          ...                      0   \n",
       "88036          ...                      0   \n",
       "73676          ...                      0   \n",
       "\n",
       "                                  user.profile_image_url  \\\n",
       "76462  https://tvax4.sinaimg.cn/crop.0.0.640.640.180/...   \n",
       "8855   https://tvax3.sinaimg.cn/crop.0.0.640.640.180/...   \n",
       "78023  https://tvax1.sinaimg.cn/crop.0.0.640.640.180/...   \n",
       "88036  https://tvax2.sinaimg.cn/crop.0.0.640.640.180/...   \n",
       "73676  https://tvax1.sinaimg.cn/crop.0.0.1080.1080.18...   \n",
       "\n",
       "                                     user.profile_url user.screen_name  \\\n",
       "76462  https://m.weibo.cn/u/7012413636?uid=7012413636       困困的菜ICV124   \n",
       "8855   https://m.weibo.cn/u/7012480301?uid=7012480301       雨露奎哥tCs622   \n",
       "78023  https://m.weibo.cn/u/7012731691?uid=7012731691       最酷的坤XLL749   \n",
       "88036  https://m.weibo.cn/u/7017930638?uid=7017930638       超赞坤哥cVR094   \n",
       "73676  https://m.weibo.cn/u/6673451463?uid=6673451463            坤的白菜丝   \n",
       "\n",
       "       user.statuses_count user.urank  user.verified  user.verified_reason  \\\n",
       "76462                   33          4          False                   NaN   \n",
       "8855                    19          1          False                   NaN   \n",
       "78023                   27          3          False                   NaN   \n",
       "88036                   24          3          False                   NaN   \n",
       "73676                   32          9          False                   NaN   \n",
       "\n",
       "       user.verified_type user.verified_type_ext  \n",
       "76462                  -1                    NaN  \n",
       "8855                   -1                    NaN  \n",
       "78023                  -1                    NaN  \n",
       "88036                  -1                    NaN  \n",
       "73676                  -1                    NaN  \n",
       "\n",
       "[5 rows x 97 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.sample(5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 1. 数据清洗\n",
    "由于数据入库的时候没有进行清洗，所以数据多出了很多没用的字段，需要先清洗掉"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['_id', 'attitudes_count', 'bid', 'can_edit', 'cardid', 'comments_count',\n",
       "       'content_auth', 'created_at', 'darwin_tags', 'edit_at', 'edit_count',\n",
       "       'favorited', 'hide_flag', 'id', 'isLongText', 'is_imported_topic',\n",
       "       'is_paid', 'mblog_vip_type', 'mblogtype', 'mid', 'more_info_type',\n",
       "       'pending_approval_count', 'pic_ids', 'pic_types', 'pid', 'raw_text',\n",
       "       'reposts_count', 'reward_exhibition_type', 'show_additional_indication',\n",
       "       'source', 'sync_mblog', 'topic_id', 'user.avatar_hd',\n",
       "       'user.badge.anniversary', 'user.badge.asiad_2018',\n",
       "       'user.badge.bind_taobao', 'user.badge.cz_wed_2017', 'user.badge.dailv',\n",
       "       'user.badge.dailv_2018', 'user.badge.denglong_2019',\n",
       "       'user.badge.double11_2018', 'user.badge.dzwbqlx_2016',\n",
       "       'user.badge.follow_whitelist_video', 'user.badge.fools_day_2016',\n",
       "       'user.badge.fu_2019', 'user.badge.gongyi', 'user.badge.gongyi_level',\n",
       "       'user.badge.hongbaofei_2019', 'user.badge.kpl_2018',\n",
       "       'user.badge.league_badge', 'user.badge.league_badge_2018',\n",
       "       'user.badge.lol_gm_2017', 'user.badge.lol_s8',\n",
       "       'user.badge.meilizhongguo_2018', 'user.badge.memorial_2018',\n",
       "       'user.badge.national_day_2018', 'user.badge.panda',\n",
       "       'user.badge.qixi_2018', 'user.badge.suishoupai_2018',\n",
       "       'user.badge.super_star_2017', 'user.badge.super_star_2018',\n",
       "       'user.badge.taobao', 'user.badge.travel_2017',\n",
       "       'user.badge.uefa_euro_2016', 'user.badge.unread_pool',\n",
       "       'user.badge.unread_pool_ext', 'user.badge.user_name_certificate',\n",
       "       'user.badge.vip_activity2', 'user.badge.wbzy_2018',\n",
       "       'user.badge.wenchuan_10th', 'user.badge.wenda_v2',\n",
       "       'user.badge.womensday_2018', 'user.badge.worldcup_2018',\n",
       "       'user.badge.yiqijuan_2018', 'user.badge.zongyiji', 'user.close_blue_v',\n",
       "       'user.cover_image_phone', 'user.description', 'user.follow_count',\n",
       "       'user.follow_me', 'user.followers_count', 'user.following',\n",
       "       'user.gender', 'user.id', 'user.like', 'user.like_me', 'user.mbrank',\n",
       "       'user.mbtype', 'user.profile_image_url', 'user.profile_url',\n",
       "       'user.screen_name', 'user.statuses_count', 'user.urank',\n",
       "       'user.verified', 'user.verified_reason', 'user.verified_type',\n",
       "       'user.verified_type_ext'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [],
   "source": [
    "in_columns = ['attitudes_count', 'comments_count', 'reposts_count', 'mid', 'raw_text', \n",
    "          'source', 'user.description', 'user.follow_count', 'user.followers_count', \n",
    "          'user.gender', 'user.id', 'user.mbrank', 'user.mbtype', 'user.profile_url', \n",
    "          'user.profile_image_url', 'user.screen_name', 'user.statuses_count', \n",
    "          'user.urank', 'user.verified', 'user.verified_reason']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = data[in_columns]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 102313 entries, 0 to 102312\n",
      "Data columns (total 20 columns):\n",
      "attitudes_count           102313 non-null int64\n",
      "comments_count            102313 non-null int64\n",
      "reposts_count             102313 non-null int64\n",
      "mid                       102313 non-null object\n",
      "raw_text                  102313 non-null object\n",
      "source                    102313 non-null object\n",
      "user.description          102313 non-null object\n",
      "user.follow_count         102313 non-null int64\n",
      "user.followers_count      102313 non-null int64\n",
      "user.gender               102313 non-null object\n",
      "user.id                   102313 non-null int64\n",
      "user.mbrank               102313 non-null int64\n",
      "user.mbtype               102313 non-null int64\n",
      "user.profile_url          102313 non-null object\n",
      "user.profile_image_url    102313 non-null object\n",
      "user.screen_name          102313 non-null object\n",
      "user.statuses_count       102313 non-null int64\n",
      "user.urank                102313 non-null int64\n",
      "user.verified             102313 non-null bool\n",
      "user.verified_reason      356 non-null object\n",
      "dtypes: bool(1), int64(10), object(9)\n",
      "memory usage: 14.9+ MB\n"
     ]
    }
   ],
   "source": [
    "data.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {},
   "outputs": [],
   "source": [
    "data.to_csv('caixukun.csv', index=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "问题：\n",
    "1. 蔡徐坤的微博转发是否存在假流量？\n",
    "2. 真假流量所占的比例各有多少？\n",
    "3. 假流量粉丝是如何生产出来的？\n",
    "4. 真流量粉的粉丝画像"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1. 蔡徐坤的微博转发是否存在假流量？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "m    93618\n",
       "f     8695\n",
       "Name: user.gender, dtype: int64"
      ]
     },
     "execution_count": 115,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 先来看看蔡徐坤的粉丝性别比例\n",
    "fans_num = data['user.gender'].value_counts()\n",
    "fans_num"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 162,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"3d94c622573f4ebab2ce5170ccf9d1cc\" style=\"width:600px;height:500px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts'], function(echarts) {\n",
       "        \n",
       "var myChart_3d94c622573f4ebab2ce5170ccf9d1cc = echarts.init(document.getElementById('3d94c622573f4ebab2ce5170ccf9d1cc'), null, {renderer: 'canvas'});\n",
       "var option_3d94c622573f4ebab2ce5170ccf9d1cc = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u8521\\u5f90\\u5764\\u7c89\\u4e1d\\u6027\\u522b\\u6bd4\\u4f8b\\u521d\\u63a2\",\n",
       "            \"subtext\": \"\",\n",
       "            \"left\": \"auto\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#000\",\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"color\": \"#aaa\",\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u4e0b\\u8f7d\\u56fe\\u7247\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 2406483,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"formatter\": null,\n",
       "        \"textStyle\": {\n",
       "            \"color\": \"#fff\",\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"(\\u603b\\u6570\\u636e102313\\u6761)\",\n",
       "            \"data\": [\n",
       "                93618.0,\n",
       "                8695.0\n",
       "            ],\n",
       "            \"stack\": \"stack_2406483\",\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#000\",\n",
       "                        \"fontSize\": 12\n",
       "                    },\n",
       "                    \"formatter\": null\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": null,\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#fff\",\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"seriesId\": 2406483\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"(\\u603b\\u6570\\u636e102313\\u6761)\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12,\n",
       "                \"color\": \"#333\"\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"backgroundColor\": \"#fff\",\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"interval\": \"auto\",\n",
       "                \"rotate\": 0,\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 20,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"data\": [\n",
       "                \"\\u7537\",\n",
       "                \"\\u5973\"\n",
       "            ],\n",
       "            \"type\": \"category\"\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"formatter\": \"{value} \",\n",
       "                \"rotate\": 0,\n",
       "                \"interval\": \"auto\",\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 14,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"type\": \"value\"\n",
       "        }\n",
       "    ],\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_3d94c622573f4ebab2ce5170ccf9d1cc.setOption(option_3d94c622573f4ebab2ce5170ccf9d1cc);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.bar.Bar at 0x121405dd8>"
      ]
     },
     "execution_count": 162,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import Bar\n",
    "\n",
    "bar = Bar(\"蔡徐坤粉丝性别比例初探\", width = 600,height=500)\n",
    "bar.add(\"(总数据102313条)\", ['男', '女'], fans_num.values, is_stack=True, \n",
    "       xaxis_label_textsize=20, yaxis_label_textsize=14, is_label_show=True)\n",
    "bar"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "m    91.5\n",
       "f     8.5\n",
       "Name: user.gender, dtype: float64"
      ]
     },
     "execution_count": 118,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.round(fans_num/fans_num.sum()*100, 2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>attitudes_count</th>\n",
       "      <th>comments_count</th>\n",
       "      <th>reposts_count</th>\n",
       "      <th>mid</th>\n",
       "      <th>raw_text</th>\n",
       "      <th>source</th>\n",
       "      <th>user.description</th>\n",
       "      <th>user.follow_count</th>\n",
       "      <th>user.followers_count</th>\n",
       "      <th>user.gender</th>\n",
       "      <th>user.id</th>\n",
       "      <th>user.mbrank</th>\n",
       "      <th>user.mbtype</th>\n",
       "      <th>user.profile_url</th>\n",
       "      <th>user.profile_image_url</th>\n",
       "      <th>user.screen_name</th>\n",
       "      <th>user.statuses_count</th>\n",
       "      <th>user.urank</th>\n",
       "      <th>user.verified</th>\n",
       "      <th>user.verified_reason</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2270</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348038635531052</td>\n",
       "      <td>卷毛帅哥的自拍简直是太帅啦！//@Elvirababe-:再见啦千千//@AK47-HIAH...</td>\n",
       "      <td>红米Redmi</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>m</td>\n",
       "      <td>7020364228</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/7020364228?uid=7020364228</td>\n",
       "      <td>https://tvax4.sinaimg.cn/crop.160.0.640.640.18...</td>\n",
       "      <td>快乐追坤Z96406</td>\n",
       "      <td>30</td>\n",
       "      <td>2</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14667</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348319830485901</td>\n",
       "      <td>Even anticipate discrete, I met the other thei...</td>\n",
       "      <td>Android</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>m</td>\n",
       "      <td>6980837370</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6980837370?uid=6980837370</td>\n",
       "      <td>https://tvax1.sinaimg.cn/crop.0.65.169.169.180...</td>\n",
       "      <td>结愁肠百QfQ953</td>\n",
       "      <td>201</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>91271</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348662274153156</td>\n",
       "      <td>善良的人，善良的心//@石头打瞌睡:#东方风云榜让世界看见蔡徐坤#  [喵喵] #蔡徐坤的未...</td>\n",
       "      <td>Android</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>m</td>\n",
       "      <td>7011848763</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/7011848763?uid=7011848763</td>\n",
       "      <td>https://tvax3.sinaimg.cn/crop.0.0.640.640.180/...</td>\n",
       "      <td>AK战士phX674</td>\n",
       "      <td>60</td>\n",
       "      <td>3</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24223</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348391876258523</td>\n",
       "      <td>[吃瓜]//@蔡老板的心尖宠:#蔡徐坤[超话]#|#蔡徐坤的未完成#  用真心呵护小动物，感...</td>\n",
       "      <td>Android</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>m</td>\n",
       "      <td>6827212466</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6827212466?uid=6827212466</td>\n",
       "      <td>https://tvax3.sinaimg.cn/default/images/defaul...</td>\n",
       "      <td>用户6827212466</td>\n",
       "      <td>243</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24765</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348374163394192</td>\n",
       "      <td>Four</td>\n",
       "      <td>Android</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>m</td>\n",
       "      <td>7012476563</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/7012476563?uid=7012476563</td>\n",
       "      <td>https://tvax2.sinaimg.cn/crop.0.10.640.640.180...</td>\n",
       "      <td>小坤的花3MB514</td>\n",
       "      <td>31</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       attitudes_count  comments_count  reposts_count               mid  \\\n",
       "2270                 0               0              0  4348038635531052   \n",
       "14667                0               0              0  4348319830485901   \n",
       "91271                0               0              0  4348662274153156   \n",
       "24223                0               0              0  4348391876258523   \n",
       "24765                0               0              0  4348374163394192   \n",
       "\n",
       "                                                raw_text   source  \\\n",
       "2270   卷毛帅哥的自拍简直是太帅啦！//@Elvirababe-:再见啦千千//@AK47-HIAH...  红米Redmi   \n",
       "14667  Even anticipate discrete, I met the other thei...  Android   \n",
       "91271  善良的人，善良的心//@石头打瞌睡:#东方风云榜让世界看见蔡徐坤#  [喵喵] #蔡徐坤的未...  Android   \n",
       "24223  [吃瓜]//@蔡老板的心尖宠:#蔡徐坤[超话]#|#蔡徐坤的未完成#  用真心呵护小动物，感...  Android   \n",
       "24765                                               Four  Android   \n",
       "\n",
       "      user.description  user.follow_count  user.followers_count user.gender  \\\n",
       "2270                                    0                     1           m   \n",
       "14667                                   0                     1           m   \n",
       "91271                                   0                     1           m   \n",
       "24223                                   0                     1           m   \n",
       "24765                                   0                     1           m   \n",
       "\n",
       "          user.id  user.mbrank  user.mbtype  \\\n",
       "2270   7020364228            0            0   \n",
       "14667  6980837370            0            0   \n",
       "91271  7011848763            0            0   \n",
       "24223  6827212466            0            0   \n",
       "24765  7012476563            0            0   \n",
       "\n",
       "                                     user.profile_url  \\\n",
       "2270   https://m.weibo.cn/u/7020364228?uid=7020364228   \n",
       "14667  https://m.weibo.cn/u/6980837370?uid=6980837370   \n",
       "91271  https://m.weibo.cn/u/7011848763?uid=7011848763   \n",
       "24223  https://m.weibo.cn/u/6827212466?uid=6827212466   \n",
       "24765  https://m.weibo.cn/u/7012476563?uid=7012476563   \n",
       "\n",
       "                                  user.profile_image_url user.screen_name  \\\n",
       "2270   https://tvax4.sinaimg.cn/crop.160.0.640.640.18...       快乐追坤Z96406   \n",
       "14667  https://tvax1.sinaimg.cn/crop.0.65.169.169.180...       结愁肠百QfQ953   \n",
       "91271  https://tvax3.sinaimg.cn/crop.0.0.640.640.180/...       AK战士phX674   \n",
       "24223  https://tvax3.sinaimg.cn/default/images/defaul...     用户6827212466   \n",
       "24765  https://tvax2.sinaimg.cn/crop.0.10.640.640.180...       小坤的花3MB514   \n",
       "\n",
       "       user.statuses_count  user.urank  user.verified user.verified_reason  \n",
       "2270                    30           2          False                  NaN  \n",
       "14667                  201           4          False                  NaN  \n",
       "91271                   60           3          False                  NaN  \n",
       "24223                  243           4          False                  NaN  \n",
       "24765                   31           4          False                  NaN  "
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data[data['user.gender']=='m'].sample(5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2. 真假流量所占的比例各有多少？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 216,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>attitudes_count</th>\n",
       "      <th>comments_count</th>\n",
       "      <th>reposts_count</th>\n",
       "      <th>mid</th>\n",
       "      <th>raw_text</th>\n",
       "      <th>source</th>\n",
       "      <th>user.description</th>\n",
       "      <th>user.follow_count</th>\n",
       "      <th>user.followers_count</th>\n",
       "      <th>user.gender</th>\n",
       "      <th>user.id</th>\n",
       "      <th>user.mbrank</th>\n",
       "      <th>user.mbtype</th>\n",
       "      <th>user.profile_url</th>\n",
       "      <th>user.profile_image_url</th>\n",
       "      <th>user.screen_name</th>\n",
       "      <th>user.statuses_count</th>\n",
       "      <th>user.urank</th>\n",
       "      <th>user.verified</th>\n",
       "      <th>user.verified_reason</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>85984</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348635833440929</td>\n",
       "      <td>遇见你真好 好喜欢你呀</td>\n",
       "      <td>Android</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>m</td>\n",
       "      <td>7017942798</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/7017942798?uid=7017942798</td>\n",
       "      <td>https://tvax3.sinaimg.cn/crop.0.0.640.640.180/...</td>\n",
       "      <td>守护坤宝rGX399</td>\n",
       "      <td>13</td>\n",
       "      <td>2</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14659</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348319851483539</td>\n",
       "      <td>My eyes have seen and my ears have heard.     ...</td>\n",
       "      <td>Android</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>m</td>\n",
       "      <td>6974693897</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6974693897?uid=6974693897</td>\n",
       "      <td>https://tvax3.sinaimg.cn/crop.3.0.94.94.180/00...</td>\n",
       "      <td>花花世界cu1087</td>\n",
       "      <td>51</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10218</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348296446870440</td>\n",
       "      <td>With the wonder of your love， the sun above al...</td>\n",
       "      <td>Android</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>m</td>\n",
       "      <td>7011842865</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/7011842865?uid=7011842865</td>\n",
       "      <td>https://tvax4.sinaimg.cn/crop.0.0.640.640.180/...</td>\n",
       "      <td>绽放光芒ofM731</td>\n",
       "      <td>33</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>78725</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348610562398099</td>\n",
       "      <td>身为偶像，以身作则。</td>\n",
       "      <td>Android</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>m</td>\n",
       "      <td>6941108958</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6941108958?uid=6941108958</td>\n",
       "      <td>https://tvax1.sinaimg.cn/crop.0.0.690.690.180/...</td>\n",
       "      <td>葵妹威武36F539</td>\n",
       "      <td>64</td>\n",
       "      <td>3</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>55694</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348399592999505</td>\n",
       "      <td>Distance, //@小葵花迷糊:带着我们的爱好好长大吧[米奇比心]蔡徐坤</td>\n",
       "      <td>三星Galaxy NOTE III</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>m</td>\n",
       "      <td>6940713794</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6940713794?uid=6940713794</td>\n",
       "      <td>https://tvax3.sinaimg.cn/crop.0.0.446.446.180/...</td>\n",
       "      <td>AK突突9TM962</td>\n",
       "      <td>17</td>\n",
       "      <td>3</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       attitudes_count  comments_count  reposts_count               mid  \\\n",
       "85984                0               0              0  4348635833440929   \n",
       "14659                0               0              0  4348319851483539   \n",
       "10218                0               0              0  4348296446870440   \n",
       "78725                0               0              0  4348610562398099   \n",
       "55694                0               0              0  4348399592999505   \n",
       "\n",
       "                                                raw_text             source  \\\n",
       "85984                                        遇见你真好 好喜欢你呀            Android   \n",
       "14659  My eyes have seen and my ears have heard.     ...            Android   \n",
       "10218  With the wonder of your love， the sun above al...            Android   \n",
       "78725                                         身为偶像，以身作则。            Android   \n",
       "55694            Distance, //@小葵花迷糊:带着我们的爱好好长大吧[米奇比心]蔡徐坤  三星Galaxy NOTE III   \n",
       "\n",
       "      user.description  user.follow_count  user.followers_count user.gender  \\\n",
       "85984                                   0                     1           m   \n",
       "14659                                   0                     1           m   \n",
       "10218                                   0                     1           m   \n",
       "78725                                   0                     1           m   \n",
       "55694                                   0                     1           m   \n",
       "\n",
       "          user.id  user.mbrank  user.mbtype  \\\n",
       "85984  7017942798            0            0   \n",
       "14659  6974693897            0            0   \n",
       "10218  7011842865            0            0   \n",
       "78725  6941108958            0            0   \n",
       "55694  6940713794            0            0   \n",
       "\n",
       "                                     user.profile_url  \\\n",
       "85984  https://m.weibo.cn/u/7017942798?uid=7017942798   \n",
       "14659  https://m.weibo.cn/u/6974693897?uid=6974693897   \n",
       "10218  https://m.weibo.cn/u/7011842865?uid=7011842865   \n",
       "78725  https://m.weibo.cn/u/6941108958?uid=6941108958   \n",
       "55694  https://m.weibo.cn/u/6940713794?uid=6940713794   \n",
       "\n",
       "                                  user.profile_image_url user.screen_name  \\\n",
       "85984  https://tvax3.sinaimg.cn/crop.0.0.640.640.180/...       守护坤宝rGX399   \n",
       "14659  https://tvax3.sinaimg.cn/crop.3.0.94.94.180/00...       花花世界cu1087   \n",
       "10218  https://tvax4.sinaimg.cn/crop.0.0.640.640.180/...       绽放光芒ofM731   \n",
       "78725  https://tvax1.sinaimg.cn/crop.0.0.690.690.180/...       葵妹威武36F539   \n",
       "55694  https://tvax3.sinaimg.cn/crop.0.0.446.446.180/...       AK突突9TM962   \n",
       "\n",
       "       user.statuses_count  user.urank  user.verified user.verified_reason  \n",
       "85984                   13           2          False                  NaN  \n",
       "14659                   51           4          False                  NaN  \n",
       "10218                   33           4          False                  NaN  \n",
       "78725                   64           3          False                  NaN  \n",
       "55694                   17           3          False                  NaN  "
      ]
     },
     "execution_count": 216,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_fake = data[((data['user.follow_count']<=5)|(data['user.followers_count']<=5))&\n",
    "                 (data['user.description']=='')&\n",
    "                 (data['comments_count']==0)&\n",
    "                (data['attitudes_count']==0)&\n",
    "                (data['reposts_count']==0)&\n",
    "                (data['user.mbrank']==0)]\n",
    "data_fake.sample(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 217,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(95326, 20)"
      ]
     },
     "execution_count": 217,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_fake.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 218,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 昵称里包含“用户”的，基本上可以断定是假粉丝\n",
    "data_fake2_index = data[(data['user.follow_count']>5)&\n",
    "                        (data['user.followers_count']>5)&\n",
    "                        (data['user.screen_name'].str.contains('用户'))].index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 220,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 把假的流量粉丝转发组合起来\n",
    "data_fake = pd.concat([data_fake, data.iloc[data_fake2_index]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 221,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(95397, 20)"
      ]
     },
     "execution_count": 221,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_fake.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 222,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 取出真粉的转发\n",
    "data_true = data.drop(data_fake.index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 223,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(6916, 20)"
      ]
     },
     "execution_count": 223,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_true.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 224,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "真粉丝转发数占总转发数的6.76%\n",
      "假粉丝转发数占总转发数的93.24%\n"
     ]
    }
   ],
   "source": [
    "print('真粉丝转发数占总转发数的{}%'.format(np.round(data_true.shape[0]/data.shape[0]*100, 2)))\n",
    "print('假粉丝转发数占总转发数的{}%'.format(np.round(data_fake.shape[0]/data.shape[0]*100, 2)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 225,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"7a453fedd70e477788cbea213bd5256b\" style=\"width:600px;height:500px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts'], function(echarts) {\n",
       "        \n",
       "var myChart_7a453fedd70e477788cbea213bd5256b = echarts.init(document.getElementById('7a453fedd70e477788cbea213bd5256b'), null, {renderer: 'canvas'});\n",
       "var option_7a453fedd70e477788cbea213bd5256b = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u8521\\u5f90\\u5764\\u771f\\u5047\\u6d41\\u91cf\\u7684\\u8f6c\\u53d1\\u91cf\",\n",
       "            \"subtext\": \"\",\n",
       "            \"left\": \"auto\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#000\",\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"color\": \"#aaa\",\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u4e0b\\u8f7d\\u56fe\\u7247\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 3006664,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"formatter\": null,\n",
       "        \"textStyle\": {\n",
       "            \"color\": \"#fff\",\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"(\\u603b\\u6570\\u636e102313\\u6761)\",\n",
       "            \"data\": [\n",
       "                102313,\n",
       "                95397,\n",
       "                6916\n",
       "            ],\n",
       "            \"stack\": \"stack_3006664\",\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#000\",\n",
       "                        \"fontSize\": 12\n",
       "                    },\n",
       "                    \"formatter\": null\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": null,\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#fff\",\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"seriesId\": 3006664\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"(\\u603b\\u6570\\u636e102313\\u6761)\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12,\n",
       "                \"color\": \"#333\"\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"backgroundColor\": \"#fff\",\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"interval\": \"auto\",\n",
       "                \"rotate\": 0,\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 20,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"data\": [\n",
       "                \"\\u603b\\u8f6c\\u53d1\\u91cf\",\n",
       "                \"\\u5047\\u7c89\\u4e1d\\u8f6c\\u53d1\\u91cf\",\n",
       "                \"\\u771f\\u7c89\\u4e1d\\u8f6c\\u53d1\\u91cf\"\n",
       "            ],\n",
       "            \"type\": \"category\"\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"formatter\": \"{value} \",\n",
       "                \"rotate\": 0,\n",
       "                \"interval\": \"auto\",\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 14,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"type\": \"value\"\n",
       "        }\n",
       "    ],\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_7a453fedd70e477788cbea213bd5256b.setOption(option_7a453fedd70e477788cbea213bd5256b);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.bar.Bar at 0x12140f9b0>"
      ]
     },
     "execution_count": 225,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bar = Bar(\"蔡徐坤真假流量的转发量\", width = 600,height=500)\n",
    "bar.add(\"(总数据102313条)\", ['总转发量', '假粉丝转发量', '真粉丝转发量'], \n",
    "        [data.shape[0], data_fake.shape[0], data_true.shape[0]], is_stack=True, \n",
    "       xaxis_label_textsize=20, yaxis_label_textsize=14, is_label_show=True)\n",
    "bar"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 226,
   "metadata": {},
   "outputs": [],
   "source": [
    "real_fans_num = data_true.drop_duplicates(subset='user.id').shape[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 227,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"8c10c8f69cf949f384cef0d27d6b51f9\" style=\"width:600px;height:500px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts'], function(echarts) {\n",
       "        \n",
       "var myChart_8c10c8f69cf949f384cef0d27d6b51f9 = echarts.init(document.getElementById('8c10c8f69cf949f384cef0d27d6b51f9'), null, {renderer: 'canvas'});\n",
       "var option_8c10c8f69cf949f384cef0d27d6b51f9 = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u8521\\u5f90\\u5764\\u771f\\u5047\\u6d41\\u91cf\\u7684\\u8f6c\\u53d1\\u91cf\\u4e0e\\u771f\\u5b9e\\u8f6c\\u53d1\\u7c89\\u4e1d\\u91cf(\\u603b\\u6570\\u636e102313\\u6761)\",\n",
       "            \"subtext\": \"\",\n",
       "            \"left\": \"auto\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#000\",\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"color\": \"#aaa\",\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u4e0b\\u8f7d\\u56fe\\u7247\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 3646397,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"formatter\": null,\n",
       "        \"textStyle\": {\n",
       "            \"color\": \"#fff\",\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\",\n",
       "            \"data\": [\n",
       "                102313,\n",
       "                95397,\n",
       "                6916,\n",
       "                3926\n",
       "            ],\n",
       "            \"stack\": \"stack_3646397\",\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#000\",\n",
       "                        \"fontSize\": 12\n",
       "                    },\n",
       "                    \"formatter\": null\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": null,\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#fff\",\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"seriesId\": 3646397\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12,\n",
       "                \"color\": \"#333\"\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"backgroundColor\": \"#fff\",\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"interval\": \"auto\",\n",
       "                \"rotate\": 20,\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 20,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"data\": [\n",
       "                \"\\u603b\\u8f6c\\u53d1\\u91cf\",\n",
       "                \"\\u5047\\u7c89\\u4e1d\\u8f6c\\u53d1\\u91cf\",\n",
       "                \"\\u771f\\u7c89\\u4e1d\\u8f6c\\u53d1\\u91cf\",\n",
       "                \"\\u771f\\u5b9e\\u8f6c\\u53d1\\u7c89\\u4e1d\\u91cf\"\n",
       "            ],\n",
       "            \"type\": \"category\"\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"formatter\": \"{value} \",\n",
       "                \"rotate\": 0,\n",
       "                \"interval\": \"auto\",\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 14,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"type\": \"value\"\n",
       "        }\n",
       "    ],\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_8c10c8f69cf949f384cef0d27d6b51f9.setOption(option_8c10c8f69cf949f384cef0d27d6b51f9);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.bar.Bar at 0x1214180f0>"
      ]
     },
     "execution_count": 227,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bar = Bar(\"蔡徐坤真假流量的转发量与真实转发粉丝量(总数据102313条)\", width = 600,height=500)\n",
    "bar.add('', ['总转发量', '假粉丝转发量', '真粉丝转发量', '真实转发粉丝量'], \n",
    "        [data.shape[0], data_fake.shape[0], data_true.shape[0], real_fans_num], is_stack=True, \n",
    "       xaxis_label_textsize=20, yaxis_label_textsize=14, is_label_show=True, xaxis_rotate=20)\n",
    "bar"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 228,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "真实转发粉丝量占总转发数的3.84%\n"
     ]
    }
   ],
   "source": [
    "print('真实转发粉丝量占总转发数的{}%'.format(np.round(real_fans_num/data.shape[0]*100, 2)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "-----------------吴青峰微博数据做对比-----------------"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 193,
   "metadata": {},
   "outputs": [],
   "source": [
    "db = conn.get_database('WuQingFeng')  # WuQingFeng\n",
    "\n",
    "repost = db.get_collection('repost') # repost\n",
    "mon_data = repost.find()  # 查询这个集合下的所有记录"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 194,
   "metadata": {},
   "outputs": [],
   "source": [
    "wqf_data = json_normalize([comment for comment in mon_data])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 195,
   "metadata": {},
   "outputs": [],
   "source": [
    "wqf_data = wqf_data[in_columns]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 196,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(10006, 20)"
      ]
     },
     "execution_count": 196,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "wqf_data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 229,
   "metadata": {},
   "outputs": [],
   "source": [
    "wqf_data_fake = wqf_data[((wqf_data['user.follow_count']<=5)|(wqf_data['user.followers_count']<=5))&\n",
    "                         (wqf_data['user.description']=='')&\n",
    "                         (wqf_data['comments_count']==0)&\n",
    "                         (wqf_data['attitudes_count']==0)&\n",
    "                         (wqf_data['reposts_count']==0)&\n",
    "                         (wqf_data['user.mbrank']==0)]\n",
    "\n",
    "wqf_data_fake2_index = wqf_data[(wqf_data['user.follow_count']>5)&\n",
    "                                (wqf_data['user.followers_count']>5)&\n",
    "                                (wqf_data['user.screen_name'].str.contains('用户'))].index\n",
    "wqf_data_fake = pd.concat([wqf_data_fake, wqf_data.iloc[wqf_data_fake2_index]])\n",
    "wqf_data_true = wqf_data.drop(wqf_data_fake.index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 230,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "吴青峰真粉丝转发数占总转发数的96.52%\n",
      "吴青峰假粉丝转发数占总转发数的3.48%\n"
     ]
    }
   ],
   "source": [
    "print('吴青峰真粉丝转发数占总转发数的{}%'.format(np.round(wqf_data_true.shape[0]/wqf_data.shape[0]*100, 2)))\n",
    "print('吴青峰假粉丝转发数占总转发数的{}%'.format(np.round(wqf_data_fake.shape[0]/wqf_data.shape[0]*100, 2)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 231,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"51652d94b2434047952e6e7c0e8f4ec0\" style=\"width:600px;height:500px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts'], function(echarts) {\n",
       "        \n",
       "var myChart_51652d94b2434047952e6e7c0e8f4ec0 = echarts.init(document.getElementById('51652d94b2434047952e6e7c0e8f4ec0'), null, {renderer: 'canvas'});\n",
       "var option_51652d94b2434047952e6e7c0e8f4ec0 = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5434\\u9752\\u5cf0\\u771f\\u5047\\u6d41\\u91cf\\u7684\\u8f6c\\u53d1\\u91cf\",\n",
       "            \"subtext\": \"\",\n",
       "            \"left\": \"auto\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#000\",\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"color\": \"#aaa\",\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u4e0b\\u8f7d\\u56fe\\u7247\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 263637,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"formatter\": null,\n",
       "        \"textStyle\": {\n",
       "            \"color\": \"#fff\",\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"(\\u603b\\u6570\\u636e10006\\u6761)\",\n",
       "            \"data\": [\n",
       "                10006,\n",
       "                348,\n",
       "                9658\n",
       "            ],\n",
       "            \"stack\": \"stack_263637\",\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#000\",\n",
       "                        \"fontSize\": 12\n",
       "                    },\n",
       "                    \"formatter\": null\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": null,\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#fff\",\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"seriesId\": 263637\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"(\\u603b\\u6570\\u636e10006\\u6761)\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12,\n",
       "                \"color\": \"#333\"\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"backgroundColor\": \"#fff\",\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"interval\": \"auto\",\n",
       "                \"rotate\": 0,\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 20,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"data\": [\n",
       "                \"\\u603b\\u8f6c\\u53d1\\u91cf\",\n",
       "                \"\\u5047\\u7c89\\u4e1d\\u8f6c\\u53d1\\u91cf\",\n",
       "                \"\\u771f\\u7c89\\u4e1d\\u8f6c\\u53d1\\u91cf\"\n",
       "            ],\n",
       "            \"type\": \"category\"\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"formatter\": \"{value} \",\n",
       "                \"rotate\": 0,\n",
       "                \"interval\": \"auto\",\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 14,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"type\": \"value\"\n",
       "        }\n",
       "    ],\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_51652d94b2434047952e6e7c0e8f4ec0.setOption(option_51652d94b2434047952e6e7c0e8f4ec0);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.bar.Bar at 0x121418780>"
      ]
     },
     "execution_count": 231,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bar = Bar(\"吴青峰真假流量的转发量\", width = 600,height=500)\n",
    "bar.add(\"(总数据10006条)\", ['总转发量', '假粉丝转发量', '真粉丝转发量'], \n",
    "        [wqf_data.shape[0], wqf_data_fake.shape[0], wqf_data_true.shape[0]], is_stack=True,\n",
    "        xaxis_label_textsize=20, yaxis_label_textsize=14, is_label_show=True)\n",
    "bar"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 232,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"e673131833db428886f0fdee20b31af1\" style=\"width:600px;height:500px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts'], function(echarts) {\n",
       "        \n",
       "var myChart_e673131833db428886f0fdee20b31af1 = echarts.init(document.getElementById('e673131833db428886f0fdee20b31af1'), null, {renderer: 'canvas'});\n",
       "var option_e673131833db428886f0fdee20b31af1 = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5434\\u9752\\u5cf0\\u771f\\u5047\\u6d41\\u91cf\\u7684\\u8f6c\\u53d1\\u91cf\\u4e0e\\u771f\\u5b9e\\u8f6c\\u53d1\\u7c89\\u4e1d\\u91cf(\\u603b\\u6570\\u636e10006\\u6761)\",\n",
       "            \"subtext\": \"\",\n",
       "            \"left\": \"auto\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#000\",\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"color\": \"#aaa\",\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u4e0b\\u8f7d\\u56fe\\u7247\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 7064643,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"formatter\": null,\n",
       "        \"textStyle\": {\n",
       "            \"color\": \"#fff\",\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\",\n",
       "            \"data\": [\n",
       "                10006,\n",
       "                348,\n",
       "                9658,\n",
       "                9318\n",
       "            ],\n",
       "            \"stack\": \"stack_7064643\",\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#000\",\n",
       "                        \"fontSize\": 12\n",
       "                    },\n",
       "                    \"formatter\": null\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": null,\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#fff\",\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"seriesId\": 7064643\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12,\n",
       "                \"color\": \"#333\"\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"backgroundColor\": \"#fff\",\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"interval\": \"auto\",\n",
       "                \"rotate\": 20,\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 20,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"data\": [\n",
       "                \"\\u603b\\u8f6c\\u53d1\\u91cf\",\n",
       "                \"\\u5047\\u7c89\\u4e1d\\u8f6c\\u53d1\\u91cf\",\n",
       "                \"\\u771f\\u7c89\\u4e1d\\u8f6c\\u53d1\\u91cf\",\n",
       "                \"\\u771f\\u5b9e\\u8f6c\\u53d1\\u7c89\\u4e1d\\u91cf\"\n",
       "            ],\n",
       "            \"type\": \"category\"\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"formatter\": \"{value} \",\n",
       "                \"rotate\": 0,\n",
       "                \"interval\": \"auto\",\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 14,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"type\": \"value\"\n",
       "        }\n",
       "    ],\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_e673131833db428886f0fdee20b31af1.setOption(option_e673131833db428886f0fdee20b31af1);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.bar.Bar at 0x121409d68>"
      ]
     },
     "execution_count": 232,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "wqf_real_fans_num = wqf_data_true.drop_duplicates(subset='user.id').shape[0]\n",
    "\n",
    "bar = Bar(\"吴青峰真假流量的转发量与真实转发粉丝量(总数据10006条)\", width = 600,height=500)\n",
    "bar.add('', ['总转发量', '假粉丝转发量', '真粉丝转发量', '真实转发粉丝量'], \n",
    "        [wqf_data.shape[0], wqf_data_fake.shape[0], wqf_data_true.shape[0], \n",
    "         wqf_real_fans_num], is_stack=True, \n",
    "        xaxis_label_textsize=20, yaxis_label_textsize=14, is_label_show=True, xaxis_rotate=20)\n",
    "bar"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 237,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>attitudes_count</th>\n",
       "      <th>comments_count</th>\n",
       "      <th>reposts_count</th>\n",
       "      <th>mid</th>\n",
       "      <th>raw_text</th>\n",
       "      <th>source</th>\n",
       "      <th>user.description</th>\n",
       "      <th>user.follow_count</th>\n",
       "      <th>user.followers_count</th>\n",
       "      <th>user.gender</th>\n",
       "      <th>user.id</th>\n",
       "      <th>user.mbrank</th>\n",
       "      <th>user.mbtype</th>\n",
       "      <th>user.profile_url</th>\n",
       "      <th>user.profile_image_url</th>\n",
       "      <th>user.screen_name</th>\n",
       "      <th>user.statuses_count</th>\n",
       "      <th>user.urank</th>\n",
       "      <th>user.verified</th>\n",
       "      <th>user.verified_reason</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>6149</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4347751288499206</td>\n",
       "      <td>爱母亲一生一世</td>\n",
       "      <td>红米Redmi</td>\n",
       "      <td></td>\n",
       "      <td>32</td>\n",
       "      <td>31</td>\n",
       "      <td>m</td>\n",
       "      <td>5676300325</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/5676300325?uid=5676300325</td>\n",
       "      <td>https://tvax1.sinaimg.cn/crop.0.0.996.996.180/...</td>\n",
       "      <td>只抓猪猪打</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3805</th>\n",
       "      <td>23</td>\n",
       "      <td>4</td>\n",
       "      <td>11</td>\n",
       "      <td>4347895002290957</td>\n",
       "      <td>哭//@囤仔:今日催泪弹</td>\n",
       "      <td>iPhone客户端</td>\n",
       "      <td>公主号：饭饭哒  混干皮，会写功课会发壁纸ヾ(･ω･*)ﾉ</td>\n",
       "      <td>435</td>\n",
       "      <td>717510</td>\n",
       "      <td>f</td>\n",
       "      <td>2273529342</td>\n",
       "      <td>6</td>\n",
       "      <td>12</td>\n",
       "      <td>https://m.weibo.cn/u/2273529342?uid=2273529342</td>\n",
       "      <td>https://tvax1.sinaimg.cn/crop.11.0.728.728.180...</td>\n",
       "      <td>饭饭饭饭哒</td>\n",
       "      <td>3380</td>\n",
       "      <td>47</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6141</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4347750722696051</td>\n",
       "      <td>转发微博</td>\n",
       "      <td>iPhone客户端</td>\n",
       "      <td>诗酒趁年华.</td>\n",
       "      <td>458</td>\n",
       "      <td>142</td>\n",
       "      <td>f</td>\n",
       "      <td>5846588842</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/5846588842?uid=5846588842</td>\n",
       "      <td>https://tvax4.sinaimg.cn/crop.0.0.640.640.180/...</td>\n",
       "      <td>阿羽想当锦鲤大王</td>\n",
       "      <td>1350</td>\n",
       "      <td>9</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>760</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348436402625735</td>\n",
       "      <td>今日的晚安曲，晚安。[心]@吳青峰</td>\n",
       "      <td>vivo AI智慧拍照X21</td>\n",
       "      <td>诸行无常，初心不易。</td>\n",
       "      <td>173</td>\n",
       "      <td>17</td>\n",
       "      <td>f</td>\n",
       "      <td>7026562408</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/7026562408?uid=7026562408</td>\n",
       "      <td>https://tvax3.sinaimg.cn/crop.0.0.996.996.180/...</td>\n",
       "      <td>Star的一纸情书</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6493</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4347738961856732</td>\n",
       "      <td>我们就这样 各自奔天涯</td>\n",
       "      <td>二月🐑iPhone XS Max</td>\n",
       "      <td>你是我小心维护的梦</td>\n",
       "      <td>255</td>\n",
       "      <td>108</td>\n",
       "      <td>f</td>\n",
       "      <td>2055723847</td>\n",
       "      <td>6</td>\n",
       "      <td>12</td>\n",
       "      <td>https://m.weibo.cn/u/2055723847?uid=2055723847</td>\n",
       "      <td>https://tvax4.sinaimg.cn/crop.0.0.1080.1080.18...</td>\n",
       "      <td>Surisuria</td>\n",
       "      <td>10184</td>\n",
       "      <td>47</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      attitudes_count  comments_count  reposts_count               mid  \\\n",
       "6149                1               0              0  4347751288499206   \n",
       "3805               23               4             11  4347895002290957   \n",
       "6141                0               0              0  4347750722696051   \n",
       "760                 0               0              0  4348436402625735   \n",
       "6493                0               0              0  4347738961856732   \n",
       "\n",
       "                 raw_text            source               user.description  \\\n",
       "6149              爱母亲一生一世           红米Redmi                                  \n",
       "3805         哭//@囤仔:今日催泪弹         iPhone客户端  公主号：饭饭哒  混干皮，会写功课会发壁纸ヾ(･ω･*)ﾉ   \n",
       "6141                 转发微博         iPhone客户端                         诗酒趁年华.   \n",
       "760   今日的晚安曲，晚安。[心]@吳青峰      vivo AI智慧拍照X21                     诸行无常，初心不易。   \n",
       "6493          我们就这样 各自奔天涯  二月🐑iPhone XS Max                      你是我小心维护的梦   \n",
       "\n",
       "      user.follow_count  user.followers_count user.gender     user.id  \\\n",
       "6149                 32                    31           m  5676300325   \n",
       "3805                435                717510           f  2273529342   \n",
       "6141                458                   142           f  5846588842   \n",
       "760                 173                    17           f  7026562408   \n",
       "6493                255                   108           f  2055723847   \n",
       "\n",
       "      user.mbrank  user.mbtype  \\\n",
       "6149            0            0   \n",
       "3805            6           12   \n",
       "6141            0            0   \n",
       "760             0            0   \n",
       "6493            6           12   \n",
       "\n",
       "                                    user.profile_url  \\\n",
       "6149  https://m.weibo.cn/u/5676300325?uid=5676300325   \n",
       "3805  https://m.weibo.cn/u/2273529342?uid=2273529342   \n",
       "6141  https://m.weibo.cn/u/5846588842?uid=5846588842   \n",
       "760   https://m.weibo.cn/u/7026562408?uid=7026562408   \n",
       "6493  https://m.weibo.cn/u/2055723847?uid=2055723847   \n",
       "\n",
       "                                 user.profile_image_url user.screen_name  \\\n",
       "6149  https://tvax1.sinaimg.cn/crop.0.0.996.996.180/...            只抓猪猪打   \n",
       "3805  https://tvax1.sinaimg.cn/crop.11.0.728.728.180...            饭饭饭饭哒   \n",
       "6141  https://tvax4.sinaimg.cn/crop.0.0.640.640.180/...         阿羽想当锦鲤大王   \n",
       "760   https://tvax3.sinaimg.cn/crop.0.0.996.996.180/...        Star的一纸情书   \n",
       "6493  https://tvax4.sinaimg.cn/crop.0.0.1080.1080.18...        Surisuria   \n",
       "\n",
       "      user.statuses_count  user.urank  user.verified user.verified_reason  \n",
       "6149                    4           4          False                  NaN  \n",
       "3805                 3380          47          False                  NaN  \n",
       "6141                 1350           9          False                  NaN  \n",
       "760                     3           4          False                  NaN  \n",
       "6493                10184          47          False                  NaN  "
      ]
     },
     "execution_count": 237,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "wqf_data.sample(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 239,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>attitudes_count</th>\n",
       "      <th>comments_count</th>\n",
       "      <th>reposts_count</th>\n",
       "      <th>mid</th>\n",
       "      <th>raw_text</th>\n",
       "      <th>source</th>\n",
       "      <th>user.description</th>\n",
       "      <th>user.follow_count</th>\n",
       "      <th>user.followers_count</th>\n",
       "      <th>user.gender</th>\n",
       "      <th>user.id</th>\n",
       "      <th>user.mbrank</th>\n",
       "      <th>user.mbtype</th>\n",
       "      <th>user.profile_url</th>\n",
       "      <th>user.profile_image_url</th>\n",
       "      <th>user.screen_name</th>\n",
       "      <th>user.statuses_count</th>\n",
       "      <th>user.urank</th>\n",
       "      <th>user.verified</th>\n",
       "      <th>user.verified_reason</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>78093</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348585275987130</td>\n",
       "      <td>dove sei passata,</td>\n",
       "      <td>Flyme</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>m</td>\n",
       "      <td>7011819483</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/7011819483?uid=7011819483</td>\n",
       "      <td>https://tvax4.sinaimg.cn/crop.0.0.640.640.180/...</td>\n",
       "      <td>思念坤坤rWM833</td>\n",
       "      <td>67</td>\n",
       "      <td>3</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48412</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348425962842699</td>\n",
       "      <td>[嘻嘻]//@KUN的小喵咪:#东方风云榜让世界看见蔡徐坤#</td>\n",
       "      <td>Android</td>\n",
       "      <td></td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>f</td>\n",
       "      <td>6589900139</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6589900139?uid=6589900139</td>\n",
       "      <td>https://tvax1.sinaimg.cn/crop.0.0.100.100.180/...</td>\n",
       "      <td>偎率把啦s</td>\n",
       "      <td>568</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47984</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348404173745759</td>\n",
       "      <td>从现在开始努力，一切都来得及</td>\n",
       "      <td>Android</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>m</td>\n",
       "      <td>7010929412</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/7010929412?uid=7010929412</td>\n",
       "      <td>https://tvax4.sinaimg.cn/crop.0.0.99.99.180/00...</td>\n",
       "      <td>音乐才子asS736</td>\n",
       "      <td>29</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>88312</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348631156993811</td>\n",
       "      <td>When you leave I'm begging you not to go.蔡徐坤 @蔡徐坤</td>\n",
       "      <td>HUAWEI P10</td>\n",
       "      <td></td>\n",
       "      <td>60</td>\n",
       "      <td>1</td>\n",
       "      <td>m</td>\n",
       "      <td>6877062416</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6877062416?uid=6877062416</td>\n",
       "      <td>https://tvax3.sinaimg.cn/crop.0.0.100.100.180/...</td>\n",
       "      <td>蔡小葵_cya56</td>\n",
       "      <td>189</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17507</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348333834721683</td>\n",
       "      <td>#东方风云榜让世界看见蔡徐坤#It’s not about the salary</td>\n",
       "      <td>Android</td>\n",
       "      <td></td>\n",
       "      <td>61</td>\n",
       "      <td>1</td>\n",
       "      <td>m</td>\n",
       "      <td>6862227587</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6862227587?uid=6862227587</td>\n",
       "      <td>https://tvax2.sinaimg.cn/crop.0.0.100.100.180/...</td>\n",
       "      <td>蔡小葵_cvr19</td>\n",
       "      <td>36</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       attitudes_count  comments_count  reposts_count               mid  \\\n",
       "78093                0               0              0  4348585275987130   \n",
       "48412                0               0              0  4348425962842699   \n",
       "47984                0               0              0  4348404173745759   \n",
       "88312                0               0              0  4348631156993811   \n",
       "17507                0               0              0  4348333834721683   \n",
       "\n",
       "                                                raw_text      source  \\\n",
       "78093                                  dove sei passata,       Flyme   \n",
       "48412                     [嘻嘻]//@KUN的小喵咪:#东方风云榜让世界看见蔡徐坤#     Android   \n",
       "47984                                     从现在开始努力，一切都来得及     Android   \n",
       "88312  When you leave I'm begging you not to go.蔡徐坤 @蔡徐坤  HUAWEI P10   \n",
       "17507           #东方风云榜让世界看见蔡徐坤#It’s not about the salary     Android   \n",
       "\n",
       "      user.description  user.follow_count  user.followers_count user.gender  \\\n",
       "78093                                   0                     1           m   \n",
       "48412                                   1                     1           f   \n",
       "47984                                   0                     1           m   \n",
       "88312                                  60                     1           m   \n",
       "17507                                  61                     1           m   \n",
       "\n",
       "          user.id  user.mbrank  user.mbtype  \\\n",
       "78093  7011819483            0            0   \n",
       "48412  6589900139            0            0   \n",
       "47984  7010929412            0            0   \n",
       "88312  6877062416            0            0   \n",
       "17507  6862227587            0            0   \n",
       "\n",
       "                                     user.profile_url  \\\n",
       "78093  https://m.weibo.cn/u/7011819483?uid=7011819483   \n",
       "48412  https://m.weibo.cn/u/6589900139?uid=6589900139   \n",
       "47984  https://m.weibo.cn/u/7010929412?uid=7010929412   \n",
       "88312  https://m.weibo.cn/u/6877062416?uid=6877062416   \n",
       "17507  https://m.weibo.cn/u/6862227587?uid=6862227587   \n",
       "\n",
       "                                  user.profile_image_url user.screen_name  \\\n",
       "78093  https://tvax4.sinaimg.cn/crop.0.0.640.640.180/...       思念坤坤rWM833   \n",
       "48412  https://tvax1.sinaimg.cn/crop.0.0.100.100.180/...            偎率把啦s   \n",
       "47984  https://tvax4.sinaimg.cn/crop.0.0.99.99.180/00...       音乐才子asS736   \n",
       "88312  https://tvax3.sinaimg.cn/crop.0.0.100.100.180/...        蔡小葵_cya56   \n",
       "17507  https://tvax2.sinaimg.cn/crop.0.0.100.100.180/...        蔡小葵_cvr19   \n",
       "\n",
       "       user.statuses_count  user.urank  user.verified user.verified_reason  \n",
       "78093                   67           3          False                  NaN  \n",
       "48412                  568           4          False                  NaN  \n",
       "47984                   29           4          False                  NaN  \n",
       "88312                  189           4          False                  NaN  \n",
       "17507                   36           4          False                  NaN  "
      ]
     },
     "execution_count": 239,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.sample(5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 3. 假流量粉丝是如何生产出来的？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 246,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "m    38969\n",
       "f     1869\n",
       "Name: user.gender, dtype: int64"
      ]
     },
     "execution_count": 246,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_fake_gender = data_fake.drop_duplicates(subset='user.id')['user.gender'].value_counts()\n",
    "data_fake_gender"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 244,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>attitudes_count</th>\n",
       "      <th>comments_count</th>\n",
       "      <th>reposts_count</th>\n",
       "      <th>mid</th>\n",
       "      <th>raw_text</th>\n",
       "      <th>source</th>\n",
       "      <th>user.description</th>\n",
       "      <th>user.follow_count</th>\n",
       "      <th>user.followers_count</th>\n",
       "      <th>user.gender</th>\n",
       "      <th>user.id</th>\n",
       "      <th>user.mbrank</th>\n",
       "      <th>user.mbtype</th>\n",
       "      <th>user.profile_url</th>\n",
       "      <th>user.profile_image_url</th>\n",
       "      <th>user.screen_name</th>\n",
       "      <th>user.statuses_count</th>\n",
       "      <th>user.urank</th>\n",
       "      <th>user.verified</th>\n",
       "      <th>user.verified_reason</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>64180</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348440278763521</td>\n",
       "      <td>I just wanna talk to u don't be afraid//@i坤555...</td>\n",
       "      <td>Android</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>f</td>\n",
       "      <td>6730864661</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6730864661?uid=6730864661</td>\n",
       "      <td>https://tvax3.sinaimg.cn/crop.0.0.100.100.180/...</td>\n",
       "      <td>小葵花籽_包</td>\n",
       "      <td>175</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>79757</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348610688763958</td>\n",
       "      <td>转发微博</td>\n",
       "      <td>华为手机 畅享玩不停</td>\n",
       "      <td></td>\n",
       "      <td>61</td>\n",
       "      <td>1</td>\n",
       "      <td>f</td>\n",
       "      <td>6791332699</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6791332699?uid=6791332699</td>\n",
       "      <td>https://tvax2.sinaimg.cn/crop.0.0.131.131.180/...</td>\n",
       "      <td>野的像_狗</td>\n",
       "      <td>22</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65164</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348430597589392</td>\n",
       "      <td>You scratch my back and I'll scratch yours.//@...</td>\n",
       "      <td>Android</td>\n",
       "      <td></td>\n",
       "      <td>53</td>\n",
       "      <td>1</td>\n",
       "      <td>f</td>\n",
       "      <td>6805019442</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6805019442?uid=6805019442</td>\n",
       "      <td>https://tvax1.sinaimg.cn/crop.0.0.180.180.180/...</td>\n",
       "      <td>xx__xmmt</td>\n",
       "      <td>349</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75228</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348576912201314</td>\n",
       "      <td>[好喜欢]//@蔡徐坤内人:[心][心]//@坤坤的公主群:#东方风云榜让世界看见蔡徐坤# ...</td>\n",
       "      <td>Android</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>f</td>\n",
       "      <td>6619935138</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6619935138?uid=6619935138</td>\n",
       "      <td>https://tvax3.sinaimg.cn/default/images/defaul...</td>\n",
       "      <td>用户6619935138</td>\n",
       "      <td>255</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>87263</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348651100519444</td>\n",
       "      <td>蔡徐坤你的美貌在我心里收藏。#东方风云榜让世界看见蔡徐坤#好喜欢呀@蔡徐坤</td>\n",
       "      <td>前置双摄vivo X9s</td>\n",
       "      <td></td>\n",
       "      <td>59</td>\n",
       "      <td>2</td>\n",
       "      <td>f</td>\n",
       "      <td>6853156261</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6853156261?uid=6853156261</td>\n",
       "      <td>https://tvax2.sinaimg.cn/crop.0.0.179.179.180/...</td>\n",
       "      <td>我和_君莫笑晕在厕所</td>\n",
       "      <td>40</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       attitudes_count  comments_count  reposts_count               mid  \\\n",
       "64180                0               0              0  4348440278763521   \n",
       "79757                0               0              0  4348610688763958   \n",
       "65164                0               0              0  4348430597589392   \n",
       "75228                0               0              0  4348576912201314   \n",
       "87263                0               0              0  4348651100519444   \n",
       "\n",
       "                                                raw_text        source  \\\n",
       "64180  I just wanna talk to u don't be afraid//@i坤555...       Android   \n",
       "79757                                               转发微博    华为手机 畅享玩不停   \n",
       "65164  You scratch my back and I'll scratch yours.//@...       Android   \n",
       "75228  [好喜欢]//@蔡徐坤内人:[心][心]//@坤坤的公主群:#东方风云榜让世界看见蔡徐坤# ...       Android   \n",
       "87263              蔡徐坤你的美貌在我心里收藏。#东方风云榜让世界看见蔡徐坤#好喜欢呀@蔡徐坤  前置双摄vivo X9s   \n",
       "\n",
       "      user.description  user.follow_count  user.followers_count user.gender  \\\n",
       "64180                                   0                     1           f   \n",
       "79757                                  61                     1           f   \n",
       "65164                                  53                     1           f   \n",
       "75228                                   0                     1           f   \n",
       "87263                                  59                     2           f   \n",
       "\n",
       "          user.id  user.mbrank  user.mbtype  \\\n",
       "64180  6730864661            0            0   \n",
       "79757  6791332699            0            0   \n",
       "65164  6805019442            0            0   \n",
       "75228  6619935138            0            0   \n",
       "87263  6853156261            0            0   \n",
       "\n",
       "                                     user.profile_url  \\\n",
       "64180  https://m.weibo.cn/u/6730864661?uid=6730864661   \n",
       "79757  https://m.weibo.cn/u/6791332699?uid=6791332699   \n",
       "65164  https://m.weibo.cn/u/6805019442?uid=6805019442   \n",
       "75228  https://m.weibo.cn/u/6619935138?uid=6619935138   \n",
       "87263  https://m.weibo.cn/u/6853156261?uid=6853156261   \n",
       "\n",
       "                                  user.profile_image_url user.screen_name  \\\n",
       "64180  https://tvax3.sinaimg.cn/crop.0.0.100.100.180/...           小葵花籽_包   \n",
       "79757  https://tvax2.sinaimg.cn/crop.0.0.131.131.180/...            野的像_狗   \n",
       "65164  https://tvax1.sinaimg.cn/crop.0.0.180.180.180/...         xx__xmmt   \n",
       "75228  https://tvax3.sinaimg.cn/default/images/defaul...     用户6619935138   \n",
       "87263  https://tvax2.sinaimg.cn/crop.0.0.179.179.180/...       我和_君莫笑晕在厕所   \n",
       "\n",
       "       user.statuses_count  user.urank  user.verified user.verified_reason  \n",
       "64180                  175           4          False                  NaN  \n",
       "79757                   22           4          False                  NaN  \n",
       "65164                  349           4          False                  NaN  \n",
       "75228                  255           4          False                  NaN  \n",
       "87263                   40           4          False                  NaN  "
      ]
     },
     "execution_count": 244,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_fake[data_fake['user.gender']=='f'].sample(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 251,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"a9d40cd27c3c4d80a61fd3022e326822\" style=\"width:600px;height:500px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts'], function(echarts) {\n",
       "        \n",
       "var myChart_a9d40cd27c3c4d80a61fd3022e326822 = echarts.init(document.getElementById('a9d40cd27c3c4d80a61fd3022e326822'), null, {renderer: 'canvas'});\n",
       "var option_a9d40cd27c3c4d80a61fd3022e326822 = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u8521\\u5f90\\u5764\\u5047\\u7c89\\u4e1d\\u6027\\u522b\\u6bd4\\u4f8b\",\n",
       "            \"subtext\": \"\",\n",
       "            \"left\": \"auto\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#000\",\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"color\": \"#aaa\",\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u4e0b\\u8f7d\\u56fe\\u7247\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 3978762,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"formatter\": null,\n",
       "        \"textStyle\": {\n",
       "            \"color\": \"#fff\",\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"(\\u5047\\u7c89\\u4e1d\\u603b\\u6570\\u4e3a40838)\",\n",
       "            \"data\": [\n",
       "                38969.0,\n",
       "                1869.0\n",
       "            ],\n",
       "            \"stack\": \"stack_3978762\",\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#000\",\n",
       "                        \"fontSize\": 12\n",
       "                    },\n",
       "                    \"formatter\": null\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": null,\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#fff\",\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"seriesId\": 3978762\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"(\\u5047\\u7c89\\u4e1d\\u603b\\u6570\\u4e3a40838)\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12,\n",
       "                \"color\": \"#333\"\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"backgroundColor\": \"#fff\",\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"interval\": \"auto\",\n",
       "                \"rotate\": 0,\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 20,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"data\": [\n",
       "                \"\\u7537\",\n",
       "                \"\\u5973\"\n",
       "            ],\n",
       "            \"type\": \"category\"\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"formatter\": \"{value} \",\n",
       "                \"rotate\": 0,\n",
       "                \"interval\": \"auto\",\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 14,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"type\": \"value\"\n",
       "        }\n",
       "    ],\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_a9d40cd27c3c4d80a61fd3022e326822.setOption(option_a9d40cd27c3c4d80a61fd3022e326822);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.bar.Bar at 0x121435b70>"
      ]
     },
     "execution_count": 251,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bar = Bar(\"蔡徐坤假粉丝性别比例\", width = 600,height=500)\n",
    "bar.add(\"(假粉丝总数为40838)\", ['男', '女'], data_fake_gender.values, is_stack=True, \n",
    "       xaxis_label_textsize=20, yaxis_label_textsize=14, is_label_show=True)\n",
    "bar"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 312,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.954233801851217"
      ]
     },
     "execution_count": 312,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "38969/40838"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 252,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "转发微博                                                                                                                                         429\n",
       "I am only waiting for love to give myself up at last into his hands.                                                                         375\n",
       "想你//@蔡徐坤的南岸末阴大小姐:#东方风云榜让世界看见蔡徐坤# /#蔡徐坤的未完成#祝千千在新家能快快乐乐 健健康康的@蔡徐坤                                                                             289\n",
       "我心悦你//@蔡徐坤的南岸末阴大小姐:#东方风云榜让世界看见蔡徐坤# /#蔡徐坤的未完成#祝千千在新家能快快乐乐 健健康康的@蔡徐坤                                                                           288\n",
       "爱你//@蔡徐坤的南岸末阴大小姐:#东方风云榜让世界看见蔡徐坤# /#蔡徐坤的未完成#祝千千在新家能快快乐乐 健健康康的@蔡徐坤                                                                             278\n",
       "花花世界静守己心蔡徐坤未来可期！//@超超超超爱蔡蔡的思思:[爱你]                                                                                                           249\n",
       "As much as I should                                                                                                                          243\n",
       "So I can't forget you                                                                                                                        239\n",
       "哥哥加油唷，我们会一直在的！//@超超超超爱蔡蔡的思思:[爱你]                                                                                                             237\n",
       "属于你一个人的特别大的舞台！//@超超超超爱蔡蔡的思思:[爱你]                                                                                                             222\n",
       "My eyes have seen and my ears have heard.                                                                                                    214\n",
       "All my days I miss you next to me                                                                                                            204\n",
       "They come with their laws and their codes to bind me fast;                                                                                   200\n",
       "Now, I ask, has the time come at last when I may go in and see thy face and offer thee mysilent salutation?                                  193\n",
       "but I evade them ever, for I am only waiting for love to give myself up at last into his hands.                                              192\n",
       "That is why it is so late and why I have been guilty of such omissions.                                                                      190\n",
       "I have had my invitation to this world's festival, and thus my life has been blessed.                                                        182\n",
       "I am only waiting for love to give myself up at last into his hands.//@石头打瞌睡:#东方风云榜让世界看见蔡徐坤#  [喵喵] #蔡徐坤的未完成# 再见千老板，带着小葵对你的爱，健康成长哦[亲亲]@蔡徐坤    178\n",
       "It was my part at this feast to play upon my instrument, and I have done all I could.                                                        177\n",
       "I hate that I miss you                                                                                                                       175\n",
       "People blame me and call me heedless; I doubt not they are right in their blame.                                                             173\n",
       "Frivolous tireless                                                                                                                           171\n",
       "The market day is over and work is all done for the busy.                                                                                    170\n",
       "I'd stop if I could                                                                                                                          170\n",
       "Life, thin and light-off time and time again                                                                                                 168\n",
       "I believe I am                                                                                                                               165\n",
       "Those who came to call me in vain have gone back in anger.                                                                                   160\n",
       "All I do is wait wait wait                                                                                                                   154\n",
       "Weight weight weight                                                                                                                         154\n",
       "You're the one I'm waiting for                                                                                                               145\n",
       "                                                                                                                                            ... \n",
       "Need to know if you care //@懒得起昵称的我:傲娇千                                                                                                        1\n",
       "will finally light up your way //@懒得起昵称的我:傲娇千                                                                                                  1\n",
       "We soon believe what we desire.//@1个蕙:Bye                                                                                                      1\n",
       "水来 我在水中等你 火来 我在灰烬中等你//@坤坤的姐姐饭:再见千千 蔡徐坤麻麻爱你                                                                                                     1\n",
       "让我们静静分享 此刻难得的坦白                                                                                                                                1\n",
       "Birds of a feather flock together.//@CandyTlll:#东方风云榜让世界看见蔡徐坤# 要一直幸福哦 千千                                                                       1\n",
       "Cos I'm running low //@ByByBy-:哈                                                                                                               1\n",
       "希望她有一个好的主人                                                                                                                                     1\n",
       "So fantastic,God damn it ah yeah//@蔡徐坤家的小懒猫:想你                                                                                                 1\n",
       "倾尽毕生所学美好的词语都不足以形容你@蔡徐坤                                                                                                                         1\n",
       "世界上美好的事有很多，但是美好的人，却只有你一个，无论未来的路有多长，有多难，我们都会陪你走下去，没有期限，希望你不受束缚，希望你可以做自己喜欢的事。我们一直在，与你共进退。你若安好，我们便安好。[心]//@Kun_tatata:你好可爱啊！！！                    1\n",
       "越努力，越幸运                                                                                                                                        1\n",
       "做你自己，因为别人都有人去做了。//@KUN坤-Tiffany:千千再见                                                                                                           1\n",
       "[亲亲]//@储蓄卡身上的痣:#东方风云榜让世界看见蔡徐坤#  cxk #蔡徐坤的未完成# 再见千千，新的家庭要健康快乐呀！也希望有天在屏幕上看到他时，你能记起这份温暖与关爱！@蔡徐坤                                                   1\n",
       "“你吃烧烤会先烤什么？”   “先烤肉啊。” “我会先考虑你”//@Kun_tatata:你好可爱啊！！！                                                                                          1\n",
       "Two feet, One dance//@-Tanny:一路陪伴                                                                                                              1\n",
       "#东方风云榜让世界看见蔡徐坤# 日常想念你，坤坤宝贝                                                                                                                     1\n",
       "举贤才而授能兮，循绳墨而不颇。//@昔年KK--:再见千老板                                                                                                                 1\n",
       "in the wind and waves //@J思-ikun:有我们呢~                                                                                                         1\n",
       "Be strong inside yourself //@嗨我其实是大号:bye                                                                                                       1\n",
       "I'm making a stand, //@ByByBy-:哈                                                                                                               1\n",
       "心自由，生活就自由，到哪都有快乐                                                                                                                               1\n",
       "蔡徐坤，你的每一个笑颜，都是我无法忘怀的瞬间//@时间会沉淀答案:#东方风云榜让世界看见蔡徐坤# 祝千千🐶生幸福                                                                                       1\n",
       "啊啊啊啊啊#东方风云榜让世界看见蔡徐坤#//@22-二甲基丙烷:#蔡徐坤[超话]# 🌻#东方风云榜让世界看见蔡徐坤# 宠物医院的义工活动，展现了少年柔软的内心。@蔡徐坤 值得所有温柔相待.                                                 1\n",
       "你说用时间证明你对音乐的忠诚，我们一定会等你，等你实现自己的梦想。                                                                                                              1\n",
       "#东方风云榜让世界看见蔡徐坤# 千千啊                                                                                                                            1\n",
       "江山如画                                                                                                                                           1\n",
       "蔡徐坤，所求皆如愿，所行化坦途。@蔡徐坤                                                                                                                           1\n",
       "想念涌上来 安安静静看指环//@小心lq:再见千千[酸]带着大家对你的爱，健康成长哦[亲亲]@蔡徐坤                                                                                             1\n",
       "闭上双眼你却在徘徊//@小心lq:再见千千[酸]带着大家对你的爱，健康成长哦[亲亲]@蔡徐坤                                                                                                 1\n",
       "Name: raw_text, Length: 12679, dtype: int64"
      ]
     },
     "execution_count": 252,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_fake['raw_text'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 255,
   "metadata": {},
   "outputs": [],
   "source": [
    "fake_source = data_fake['source'].value_counts()[:10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 265,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"0a96d6a74c02489b8c8f53d41624cbfd\" style=\"width:600px;height:600px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts'], function(echarts) {\n",
       "        \n",
       "var myChart_0a96d6a74c02489b8c8f53d41624cbfd = echarts.init(document.getElementById('0a96d6a74c02489b8c8f53d41624cbfd'), null, {renderer: 'canvas'});\n",
       "var option_0a96d6a74c02489b8c8f53d41624cbfd = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u8521\\u5f90\\u5764\\u5047\\u7c89\\u4e1dTop10\\u8f6c\\u53d1\\u8bbe\\u5907\",\n",
       "            \"subtext\": \"\",\n",
       "            \"left\": \"auto\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#000\",\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"color\": \"#aaa\",\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u4e0b\\u8f7d\\u56fe\\u7247\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 5263789,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"formatter\": null,\n",
       "        \"textStyle\": {\n",
       "            \"color\": \"#fff\",\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\",\n",
       "            \"data\": [\n",
       "                65495.0,\n",
       "                2823.0,\n",
       "                2455.0,\n",
       "                2354.0,\n",
       "                2197.0,\n",
       "                1458.0,\n",
       "                1254.0,\n",
       "                1225.0,\n",
       "                1219.0,\n",
       "                1166.0\n",
       "            ],\n",
       "            \"stack\": \"stack_5263789\",\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#000\",\n",
       "                        \"fontSize\": 12\n",
       "                    },\n",
       "                    \"formatter\": null\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": null,\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#fff\",\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"seriesId\": 5263789\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12,\n",
       "                \"color\": \"#333\"\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"backgroundColor\": \"#fff\",\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"interval\": \"auto\",\n",
       "                \"rotate\": 30,\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 11,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"data\": [\n",
       "                \"Android\",\n",
       "                \"Flyme\",\n",
       "                \"\\u4e09\\u661fGalaxy NOTE III\",\n",
       "                \"\\u4e09\\u661fandroid\\u667a\\u80fd\\u624b\\u673a\",\n",
       "                \"\\u7ea2\\u7c73Redmi\",\n",
       "                \"vivo X20\\u5168\\u9762\\u5c4f\\u624b\\u673a\",\n",
       "                \"\\u5c0f\\u7c73\\u624b\\u673a\",\n",
       "                \"\\u8363\\u8000\\u624b\\u673a \\u52c7\\u6562\\u505a\\u81ea\\u5df1\",\n",
       "                \"\\u524d\\u540e2000\\u4e07 OPPO R11\",\n",
       "                \"HUAWEI P10\"\n",
       "            ],\n",
       "            \"type\": \"category\"\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"formatter\": \"{value} \",\n",
       "                \"rotate\": 0,\n",
       "                \"interval\": \"auto\",\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 14,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"type\": \"value\"\n",
       "        }\n",
       "    ],\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_0a96d6a74c02489b8c8f53d41624cbfd.setOption(option_0a96d6a74c02489b8c8f53d41624cbfd);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.bar.Bar at 0x121435588>"
      ]
     },
     "execution_count": 265,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bar = Bar(\"蔡徐坤假粉丝Top10转发设备\", width = 600,height=600)\n",
    "bar.add(\"\", fake_source.index, fake_source.values, is_stack=True, \n",
    "       xaxis_label_textsize=11, yaxis_label_textsize=14, is_label_show=True, xaxis_rotate=30)\n",
    "bar"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 267,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3.4412612555950397"
      ]
     },
     "execution_count": 267,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_fake['user.follow_count'].mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 269,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.04576663836389"
      ]
     },
     "execution_count": 269,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_fake['user.followers_count'].mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 275,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_fake_sample = data_fake.sample(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 276,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "21846       蓬蓬坤8Bd528\n",
       "80516       蓝玫瑰jov890\n",
       "55689    用户6994230787\n",
       "37178      从不认输pmb498\n",
       "11486      纵骋横驰UcL978\n",
       "Name: user.screen_name, dtype: object"
      ]
     },
     "execution_count": 276,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_fake_sample['user.screen_name']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 277,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['https://tvax3.sinaimg.cn/crop.0.0.640.640.180/007ExdLSly8g0kfgzq276j30hs0hsq4h.jpg',\n",
       "       'https://tvax2.sinaimg.cn/crop.0.0.640.640.180/007Ezlmqly8g0kbtdsc32j30ht0hsdha.jpg',\n",
       "       'https://tvax2.sinaimg.cn/crop.0.0.200.200.180/007Dl4VZly8g04u0faipsj305k05kjrg.jpg',\n",
       "       'https://tvax4.sinaimg.cn/crop.0.0.640.640.180/007EEc68ly8g0l9fjqh0xj30hs0hs0tr.jpg',\n",
       "       'https://tvax2.sinaimg.cn/crop.79.0.188.188.180/007CtWGgly8fzqpzemlkzj309m058dfq.jpg'],\n",
       "      dtype=object)"
      ]
     },
     "execution_count": 277,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_fake_sample['user.profile_image_url'].values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 281,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "9413       坤色坤香gxu584\n",
       "3347        慈祥纽_tdp10\n",
       "15825    用户6503593711\n",
       "28358       怀遇不n4D084\n",
       "96873      坤也可爱wuv340\n",
       "Name: user.screen_name, dtype: object"
      ]
     },
     "execution_count": 281,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_fake.sample(5)['user.screen_name']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 279,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "41766"
      ]
     },
     "execution_count": 279,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_fake['user.screen_name'].str.contains('蔡|坤|葵|kun').sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 280,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "95397"
      ]
     },
     "execution_count": 280,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_fake.shape[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 283,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "72.4942503433022"
      ]
     },
     "execution_count": 283,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_fake['user.statuses_count'].mean()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4. 真流量粉的粉丝画像"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 285,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>attitudes_count</th>\n",
       "      <th>comments_count</th>\n",
       "      <th>reposts_count</th>\n",
       "      <th>mid</th>\n",
       "      <th>raw_text</th>\n",
       "      <th>source</th>\n",
       "      <th>user.description</th>\n",
       "      <th>user.follow_count</th>\n",
       "      <th>user.followers_count</th>\n",
       "      <th>user.gender</th>\n",
       "      <th>user.id</th>\n",
       "      <th>user.mbrank</th>\n",
       "      <th>user.mbtype</th>\n",
       "      <th>user.profile_url</th>\n",
       "      <th>user.profile_image_url</th>\n",
       "      <th>user.screen_name</th>\n",
       "      <th>user.statuses_count</th>\n",
       "      <th>user.urank</th>\n",
       "      <th>user.verified</th>\n",
       "      <th>user.verified_reason</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>76048</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348565809642641</td>\n",
       "      <td>#东方风云榜让世界看见蔡徐坤# 遇见你的那天，我就没想过要分开。@蔡徐坤</td>\n",
       "      <td>HUAWEI Mate 10</td>\n",
       "      <td>小号轮博，互粉呀，坤坤(◍ ´꒳` ◍)</td>\n",
       "      <td>251</td>\n",
       "      <td>291</td>\n",
       "      <td>f</td>\n",
       "      <td>6505180919</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6505180919?uid=6505180919</td>\n",
       "      <td>https://tvax1.sinaimg.cn/crop.0.0.996.996.180/...</td>\n",
       "      <td>葵葵吃芒果冰呀</td>\n",
       "      <td>13518</td>\n",
       "      <td>19</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>68749</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348485031882927</td>\n",
       "      <td>想你了</td>\n",
       "      <td>Android</td>\n",
       "      <td>我与你隔着长风深谷 近不得 退不舍 ​​</td>\n",
       "      <td>291</td>\n",
       "      <td>66</td>\n",
       "      <td>f</td>\n",
       "      <td>6093210679</td>\n",
       "      <td>3</td>\n",
       "      <td>12</td>\n",
       "      <td>https://m.weibo.cn/u/6093210679?uid=6093210679</td>\n",
       "      <td>https://tvax2.sinaimg.cn/crop.0.0.996.996.180/...</td>\n",
       "      <td>善良小菜最好命</td>\n",
       "      <td>15986</td>\n",
       "      <td>14</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2162</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4347997343648508</td>\n",
       "      <td>转发微博</td>\n",
       "      <td>vivo智能手机</td>\n",
       "      <td></td>\n",
       "      <td>655</td>\n",
       "      <td>97</td>\n",
       "      <td>f</td>\n",
       "      <td>6253839509</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6253839509?uid=6253839509</td>\n",
       "      <td>https://tvax1.sinaimg.cn/crop.0.0.996.996.180/...</td>\n",
       "      <td>蔡徐坤ikun24298586</td>\n",
       "      <td>1280</td>\n",
       "      <td>12</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42740</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348419025500369</td>\n",
       "      <td>@蔡徐坤 我永远支持你！我们一起拿下 #明星势力榜# 第一名！</td>\n",
       "      <td>明星势力榜</td>\n",
       "      <td></td>\n",
       "      <td>555</td>\n",
       "      <td>72</td>\n",
       "      <td>f</td>\n",
       "      <td>6575015283</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/6575015283?uid=6575015283</td>\n",
       "      <td>https://tvax4.sinaimg.cn/crop.0.0.996.996.180/...</td>\n",
       "      <td>女王范的成全16</td>\n",
       "      <td>274</td>\n",
       "      <td>9</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>77618</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4348610940850719</td>\n",
       "      <td>#东方风云榜让世界看见蔡徐坤#@蔡徐坤 我永远支持你！我们一起拿下 #明星势力榜# 第一名！</td>\n",
       "      <td>明星势力榜</td>\n",
       "      <td></td>\n",
       "      <td>97</td>\n",
       "      <td>33</td>\n",
       "      <td>f</td>\n",
       "      <td>5635145902</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>https://m.weibo.cn/u/5635145902?uid=5635145902</td>\n",
       "      <td>https://tvax1.sinaimg.cn/crop.0.0.996.996.180/...</td>\n",
       "      <td>坤坤的小咪喵</td>\n",
       "      <td>2548</td>\n",
       "      <td>4</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       attitudes_count  comments_count  reposts_count               mid  \\\n",
       "76048                0               0              0  4348565809642641   \n",
       "68749                0               0              0  4348485031882927   \n",
       "2162                 0               0              0  4347997343648508   \n",
       "42740                0               0              0  4348419025500369   \n",
       "77618                0               0              0  4348610940850719   \n",
       "\n",
       "                                             raw_text          source  \\\n",
       "76048           #东方风云榜让世界看见蔡徐坤# 遇见你的那天，我就没想过要分开。@蔡徐坤   HUAWEI Mate 10   \n",
       "68749                                             想你了         Android   \n",
       "2162                                             转发微博        vivo智能手机   \n",
       "42740                 @蔡徐坤 我永远支持你！我们一起拿下 #明星势力榜# 第一名！           明星势力榜   \n",
       "77618  #东方风云榜让世界看见蔡徐坤#@蔡徐坤 我永远支持你！我们一起拿下 #明星势力榜# 第一名！           明星势力榜   \n",
       "\n",
       "           user.description  user.follow_count  user.followers_count  \\\n",
       "76048  小号轮博，互粉呀，坤坤(◍ ´꒳` ◍)                251                   291   \n",
       "68749  我与你隔着长风深谷 近不得 退不舍 ​​                291                    66   \n",
       "2162                                       655                    97   \n",
       "42740                                      555                    72   \n",
       "77618                                       97                    33   \n",
       "\n",
       "      user.gender     user.id  user.mbrank  user.mbtype  \\\n",
       "76048           f  6505180919            0            0   \n",
       "68749           f  6093210679            3           12   \n",
       "2162            f  6253839509            0            0   \n",
       "42740           f  6575015283            0            0   \n",
       "77618           f  5635145902            0            0   \n",
       "\n",
       "                                     user.profile_url  \\\n",
       "76048  https://m.weibo.cn/u/6505180919?uid=6505180919   \n",
       "68749  https://m.weibo.cn/u/6093210679?uid=6093210679   \n",
       "2162   https://m.weibo.cn/u/6253839509?uid=6253839509   \n",
       "42740  https://m.weibo.cn/u/6575015283?uid=6575015283   \n",
       "77618  https://m.weibo.cn/u/5635145902?uid=5635145902   \n",
       "\n",
       "                                  user.profile_image_url user.screen_name  \\\n",
       "76048  https://tvax1.sinaimg.cn/crop.0.0.996.996.180/...          葵葵吃芒果冰呀   \n",
       "68749  https://tvax2.sinaimg.cn/crop.0.0.996.996.180/...          善良小菜最好命   \n",
       "2162   https://tvax1.sinaimg.cn/crop.0.0.996.996.180/...  蔡徐坤ikun24298586   \n",
       "42740  https://tvax4.sinaimg.cn/crop.0.0.996.996.180/...         女王范的成全16   \n",
       "77618  https://tvax1.sinaimg.cn/crop.0.0.996.996.180/...           坤坤的小咪喵   \n",
       "\n",
       "       user.statuses_count  user.urank  user.verified user.verified_reason  \n",
       "76048                13518          19          False                  NaN  \n",
       "68749                15986          14          False                  NaN  \n",
       "2162                  1280          12          False                  NaN  \n",
       "42740                  274           9          False                  NaN  \n",
       "77618                 2548           4          False                  NaN  "
      ]
     },
     "execution_count": 285,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_true.sample(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 287,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "f    3287\n",
       "m     639\n",
       "Name: user.gender, dtype: int64"
      ]
     },
     "execution_count": 287,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_true_gender = data_true.drop_duplicates(subset='user.id')['user.gender'].value_counts()\n",
    "data_true_gender"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 291,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"4b6e47a3d1274a8b9b6e82d2633ad487\" style=\"width:600px;height:500px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts'], function(echarts) {\n",
       "        \n",
       "var myChart_4b6e47a3d1274a8b9b6e82d2633ad487 = echarts.init(document.getElementById('4b6e47a3d1274a8b9b6e82d2633ad487'), null, {renderer: 'canvas'});\n",
       "var option_4b6e47a3d1274a8b9b6e82d2633ad487 = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u8521\\u5f90\\u5764\\u771f\\u7c89\\u4e1d\\u6027\\u522b\\u6bd4\\u4f8b\",\n",
       "            \"subtext\": \"\",\n",
       "            \"left\": \"auto\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#000\",\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"color\": \"#aaa\",\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u4e0b\\u8f7d\\u56fe\\u7247\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 7058092,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"formatter\": null,\n",
       "        \"textStyle\": {\n",
       "            \"color\": \"#fff\",\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"(\\u771f\\u7c89\\u4e1d\\u603b\\u6570\\u4e3a3926)\",\n",
       "            \"data\": [\n",
       "                3287.0,\n",
       "                639.0\n",
       "            ],\n",
       "            \"stack\": \"stack_7058092\",\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#000\",\n",
       "                        \"fontSize\": 12\n",
       "                    },\n",
       "                    \"formatter\": null\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": null,\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#fff\",\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"seriesId\": 7058092\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"(\\u771f\\u7c89\\u4e1d\\u603b\\u6570\\u4e3a3926)\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12,\n",
       "                \"color\": \"#333\"\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"backgroundColor\": \"#fff\",\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"interval\": \"auto\",\n",
       "                \"rotate\": 0,\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 20,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"data\": [\n",
       "                \"\\u5973\",\n",
       "                \"\\u7537\"\n",
       "            ],\n",
       "            \"type\": \"category\"\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"formatter\": \"{value} \",\n",
       "                \"rotate\": 0,\n",
       "                \"interval\": \"auto\",\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 14,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"type\": \"value\"\n",
       "        }\n",
       "    ],\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_4b6e47a3d1274a8b9b6e82d2633ad487.setOption(option_4b6e47a3d1274a8b9b6e82d2633ad487);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.bar.Bar at 0x121450b38>"
      ]
     },
     "execution_count": 291,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bar = Bar(\"蔡徐坤真粉丝性别比例\", width = 600,height=500)\n",
    "bar.add(\"(真粉丝总数为3926)\", ['女', '男'], data_true_gender.values, is_stack=True, \n",
    "       xaxis_label_textsize=20, yaxis_label_textsize=14, is_label_show=True)\n",
    "bar"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 293,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "转发微博                                                                                                                                                                    1045\n",
       "@蔡徐坤 我永远支持你！我们一起拿下 #明星势力榜# 第一名！                                                                                                                                          622\n",
       "#东方风云榜让世界看见蔡徐坤#                                                                                                                                                           73\n",
       "@蔡徐坤  我在#明星ALL榜[超话]#上为你加油啦，你是我今生唯一的执著哦。#蔡徐坤[超话]# 棒棒哒！快来为TA应援吧                                                                                                             50\n",
       "//@蔡徐坤工作室:#蔡徐坤[超话]#[给你小心心]#蔡徐坤的未完成#之宠物医院终于步入尾声，在短暂的相处时间里，因为工作忙碌无法养育小动物的@蔡徐坤 也获得了片刻的慰藉，感谢千千给我们带来了一段难忘的回忆[心]#蔡徐坤 ONE#                                                       42\n",
       "#东方风云榜让世界看见蔡徐坤# [心]#蔡徐坤的未完成# [太开心]//@August-小漂亮的万花筒:#东方风云榜让世界看见蔡徐坤# [心]#蔡徐坤的未完成# 哈哈哈哈哈哈，宝贝让千千转圈圈太可爱了[笑哈哈][笑哈哈][笑哈哈]                                                       38\n",
       "//@万俟可儿IKun:0310，打卡//@CXK-FANSCLUB4:#蔡徐坤[超话]#｜#东方风云榜让世界看见蔡徐坤# 千千要乖哦@蔡徐坤                                                                                                   25\n",
       "蔡徐坤舞台 cxk 蔡徐坤正能量偶像 蔡徐坤新歌好听cxk//@旋转的木马没有翅膀:再见千千，带着大家对你的爱，健康成长哦[亲亲]@蔡徐坤                                                                                                     23\n",
       "蔡徐坤舞台 cxk 蔡徐坤正能量偶像 蔡徐坤新歌好听cxk蔡徐坤舞台 cxk 蔡徐坤正能量偶像 蔡徐坤新歌好听cxk蔡徐坤舞台 cxk 蔡徐坤正能量偶像 蔡徐坤新歌好听cxk蔡徐坤舞台 cxk 蔡徐坤正能量偶像 蔡徐坤新歌好听cxk//@旋转的木马没有翅膀:再见千千，带着大家对你的爱，健康成长哦[亲亲]@蔡徐坤              23\n",
       "#东方风云榜让世界看见蔡徐坤# [可爱]#蔡徐坤的未完成# [亲亲]//@August-小漂亮的万花筒:#东方风云榜让世界看见蔡徐坤# [心]#蔡徐坤的未完成# 哈哈哈哈哈哈，宝贝让千千转圈圈太可爱了[笑哈哈][笑哈哈][笑哈哈]                                                       21\n",
       "[微笑]//@万俟可儿IKun:0310，打卡//@CXK-FANSCLUB4:#蔡徐坤[超话]#｜#东方风云榜让世界看见蔡徐坤# 千千要乖哦@蔡徐坤                                                                                               21\n",
       "#东方风云榜让世界看见蔡徐坤# [心]#蔡徐坤的未完成# [可爱]//@August-小漂亮的万花筒:#东方风云榜让世界看见蔡徐坤# [心]#蔡徐坤的未完成# 哈哈哈哈哈哈，宝贝让千千转圈圈太可爱了[笑哈哈][笑哈哈][笑哈哈]                                                        21\n",
       "#东方风云榜让世界看见蔡徐坤# [可爱]#蔡徐坤的未完成# [心]//@August-小漂亮的万花筒:#东方风云榜让世界看见蔡徐坤# [心]#蔡徐坤的未完成# 哈哈哈哈哈哈，宝贝让千千转圈圈太可爱了[笑哈哈][笑哈哈][笑哈哈]                                                        20\n",
       "#东方风云榜让世界看见蔡徐坤# [心]#蔡徐坤的未完成# [亲亲]//@August-小漂亮的万花筒:#东方风云榜让世界看见蔡徐坤# [心]#蔡徐坤的未完成# 哈哈哈哈哈哈，宝贝让千千转圈圈太可爱了[笑哈哈][笑哈哈][笑哈哈]                                                        20\n",
       "#东方风云榜让世界看见蔡徐坤# //@Unity_蔡徐坤初心站:#蔡徐坤[超话]#|#东方风云榜让世界看见蔡徐坤# 有缘下次再见@蔡徐坤                                                                                                      19\n",
       "#东方风云榜让世界看见蔡徐坤# [可爱]#蔡徐坤的未完成# [太开心]//@August-小漂亮的万花筒:#东方风云榜让世界看见蔡徐坤# [心]#蔡徐坤的未完成# 哈哈哈哈哈哈，宝贝让千千转圈圈太可爱了[笑哈哈][笑哈哈][笑哈哈]                                                      19\n",
       "轉發微博                                                                                                                                                                      19\n",
       "//@ikun涵宝0802:#东方风云榜让世界看见蔡徐坤# 加油[拳头]//@蔡徐坤正宫后援会:#东方风云榜让世界看见蔡徐坤#  | #蔡徐坤的未完成# 千千一定要健康的成长哦[心][心][心]@蔡徐坤                                                                     18\n",
       "蔡徐坤舞台 cxk 蔡徐坤正能量偶像 蔡徐坤新歌好听cxk蔡徐坤舞台 cxk 蔡徐坤正能量偶像 蔡徐坤新歌好听cxk蔡徐坤舞台 cxk 蔡徐坤正能量偶像 蔡徐坤新歌好听cxk蔡徐坤舞台 cxk 蔡徐坤正能量偶像 蔡徐坤新歌好听cxk蔡徐坤舞台 cxk 蔡徐坤正能量偶像 蔡徐坤新歌好听cxk//@旋转的木马没有翅膀:再见千千，带      18\n",
       "//@蔡蔡的小猪猪:#东方风云榜让世界看见蔡徐坤# [笑而不语]#蔡徐坤的未完成# 千千会想你的@CXK-FANSCLUB2:千千要乖哦                                                                                                      17\n",
       "蔡徐坤舞台 cxk 蔡徐坤正能量偶像 蔡徐坤新歌好听cxk蔡徐坤舞台 cxk 蔡徐坤正能量偶像 蔡徐坤新歌好听cxk蔡徐坤舞台 cxk 蔡徐坤正能量偶像 蔡徐坤新歌好听cxk//@旋转的木马没有翅膀:再见千千，带着大家对你的爱，健康成长哦[亲亲]@蔡徐坤                                           17\n",
       "#东方风云榜让世界看见蔡徐坤#希望每个小动物都能有一个温暖的家！#东方风云榜让世界看见蔡徐坤#希望每个小动物都能有一个温暖的家！                                                                                                          16\n",
       "#东方风云榜让世界看见蔡徐坤# [心]#蔡徐坤的未完成# [笑哈哈]//@August-小漂亮的万花筒:#东方风云榜让世界看见蔡徐坤# [心]#蔡徐坤的未完成# 哈哈哈哈哈哈，宝贝让千千转圈圈太可爱了[笑哈哈][笑哈哈][笑哈哈]                                                       16\n",
       "蔡徐坤舞台 cxk 蔡徐坤正能量偶像 蔡徐坤新歌好听cxk蔡徐坤舞台 cxk 蔡徐坤正能量偶像 蔡徐坤新歌好听cxk//@旋转的木马没有翅膀:再见千千，带着大家对你的爱，健康成长哦[亲亲]@蔡徐坤                                                                        15\n",
       "//@蔡徐坤粉丝团官微:#东方风云榜让世界看见蔡徐坤#  | #蔡徐坤的未完成# 千千要健康成长噢 @蔡徐坤                                                                                                                    14\n",
       "我们蔡徐坤宝贝//@竹林涓涓:#东方风云榜让世界看见蔡徐坤#  新家要好好适应啊千千                                                                                                                                13\n",
       "#东方风云榜让世界看见蔡徐坤# [心]#蔡徐坤的未完成# [憧憬]//@August-小漂亮的万花筒:#东方风云榜让世界看见蔡徐坤# [心]#蔡徐坤的未完成# 哈哈哈哈哈哈，宝贝让千千转圈圈太可爱了[笑哈哈][笑哈哈][笑哈哈]                                                        12\n",
       "#蔡徐坤的未完成# //@Unity_蔡徐坤初心站:#蔡徐坤[超话]#|#东方风云榜让世界看见蔡徐坤# 有缘下次再见@蔡徐坤                                                                                                            12\n",
       "@蔡徐坤                                                                                                                                                                      12\n",
       "Repost                                                                                                                                                                    12\n",
       "                                                                                                                                                                        ... \n",
       "38//@坤的lxy:来了//@蔡徐坤正宫后援会:#东方风云榜让世界看见蔡徐坤#  | #蔡徐坤的未完成# 千千一定要健康的成长哦[心][心][心]@蔡徐坤                                                                                             1\n",
       "51#蔡徐坤[超话]#[心]#东方风云榜让世界看见蔡徐坤#   用心去爱，回忆满满@蔡徐坤                                                                                                                              1\n",
       "许多良辰美景，要和你一个一个去耽误。[爱你][爱你][爱你]@蔡徐坤                                                                                                                                         1\n",
       "#东方风云榜让世界看见蔡徐坤# 蔡徐坤 cxk 只因你太美好令我无法坦白说出我爱你@蔡徐坤//@看黑子多跳脚就知道蔡徐坤有多火:#东方风云榜让世界看见蔡徐坤# 千千 要乖乖的哦[亲亲][亲亲][亲亲] 哥哥好温柔哦 嘻嘻嘻[污][污]@蔡徐坤                                                  1\n",
       "斜阳草树                                                                                                                                                                       1\n",
       "蔡徐坤 谢谢你坚持这份沉甸甸的热爱，谢谢你坚持这从未做完的梦。因为你，我们会感恩，会珍惜，会成长。因为你，我们会变得有担当，会继续善良。@蔡徐坤                                                                                                   1\n",
       "加油@蔡徐坤                                                                                                                                                                     1\n",
       "32//@CXK-FANSCLUB2:千千要乖哦                                                                                                                                                   1\n",
       "总想把世界上最好的都给你，却发现世界最好的就是你@蔡徐坤                                                                                                                                               1\n",
       "#东方风云榜让世界看见蔡徐坤# 许你金海一片一片   @蔡徐坤                                                                                                                                            1\n",
       "#东方风云榜让世界看见蔡徐坤#[太开心]#蔡徐坤的未完成# 坤坤蔡徐坤 花花世界，世俗纷扰，忧愁烦恼都一笔勾销，天地之间任你逍遥20@蔡徐坤                                                                                                     1\n",
       "[偷乐]//@shelly6476767612:千千要乖哦                                                                                                                                              1\n",
       "#东方风云榜让世界看见蔡徐坤# 蔡徐坤 我喜欢你不是一见钟情也不能说停就停@蔡徐坤                                                                                                                                  1\n",
       "万物平等                                                                                                                                                                       1\n",
       "我是千千[坏笑]                                                                                                                                                                   1\n",
       "你是风儿我是沙你是哈密我是瓜你是牙膏我是刷，你不爱我我自杀[熊猫]@蔡徐坤                                                                                                                                      1\n",
       "我好想你啊，晚安[月亮]                                                                                                                                                               1\n",
       "29//@小困ikun啊://@蔡徐坤正宫后援会:#东方风云榜让世界看见蔡徐坤#  | #蔡徐坤的未完成# 千千一定要健康的成长哦[心][心][心]@蔡徐坤                                                                                             1\n",
       "他听不懂[笑cry][笑cry]#东方风云榜让世界看见蔡徐坤#                                                                                                                                            1\n",
       "千千好可爱 坤哥更可爱呀                                                                                                                                                               1\n",
       "跟可爱的千千说再见，温柔的蔡医生愿你再次出现！                                                                                                                                                    1\n",
       "We go party //@嗨我其实是大号:bye                                                                                                                                                 1\n",
       "#东方风云榜让世界看见蔡徐坤#  清新的空气，快乐的气味，透过空气射入你的灵魂里，将阳光呼吸，将幸福抱起，泡一杯甜美的咖啡，品尝幸福的意义，接受祝福的信息，祝你晨安温馨无比!                                                                                    1\n",
       "I love you//@蔡徐坤的小九九呀:哥哥要照顾好自己啊@蔡徐坤                                                                                                                                        1\n",
       "喜欢你的人很多，不缺我一个；但我爱的人很少，只有你@蔡徐坤 一个!快来为TA应援吧 #东方风云榜让世界看见蔡徐坤#                                                                                                                  1\n",
       "#东方风云榜让世界看见蔡徐坤# 宝宝我好想你啊                                                                                                                                                    1\n",
       "#东方风云榜让世界看见蔡徐坤# 棒棒棒坤坤                                                                                                                                                      1\n",
       "#东方风云榜让世界看见蔡徐坤# [微笑]#蔡徐坤的未完成# 希望蔡徐坤一直勇敢，而我们会一直保护他。@蔡徐坤                                                                                                                     1\n",
       "蔡徐坤 走在路上， 总是幻想， 只要一抬头，便能看到你。 @蔡徐坤                                                                                                                                          1\n",
       "#东方风云榜让世界看见蔡徐坤# 晚安 我睡觉啦 你也要好好休息喔 明天要早起啦 又是每天要早起的一周[跪了]                                                                                                                     1\n",
       "Name: raw_text, Length: 3738, dtype: int64"
      ]
     },
     "execution_count": 293,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_true['raw_text'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 294,
   "metadata": {},
   "outputs": [],
   "source": [
    "true_source = data_true['source'].value_counts()[:10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 295,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"3a6ee7b6de034aef82d7cf8404adf62f\" style=\"width:600px;height:600px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts'], function(echarts) {\n",
       "        \n",
       "var myChart_3a6ee7b6de034aef82d7cf8404adf62f = echarts.init(document.getElementById('3a6ee7b6de034aef82d7cf8404adf62f'), null, {renderer: 'canvas'});\n",
       "var option_3a6ee7b6de034aef82d7cf8404adf62f = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u8521\\u5f90\\u5764\\u771f\\u7c89\\u4e1dTop10\\u8f6c\\u53d1\\u8bbe\\u5907\",\n",
       "            \"subtext\": \"\",\n",
       "            \"left\": \"auto\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#000\",\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"color\": \"#aaa\",\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u4e0b\\u8f7d\\u56fe\\u7247\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 7265617,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"formatter\": null,\n",
       "        \"textStyle\": {\n",
       "            \"color\": \"#fff\",\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\",\n",
       "            \"data\": [\n",
       "                840.0,\n",
       "                712.0,\n",
       "                654.0,\n",
       "                334.0,\n",
       "                316.0,\n",
       "                297.0,\n",
       "                188.0,\n",
       "                169.0,\n",
       "                158.0,\n",
       "                143.0\n",
       "            ],\n",
       "            \"stack\": \"stack_7265617\",\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"top\",\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#000\",\n",
       "                        \"fontSize\": 12\n",
       "                    },\n",
       "                    \"formatter\": null\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": null,\n",
       "                    \"textStyle\": {\n",
       "                        \"color\": \"#fff\",\n",
       "                        \"fontSize\": 12\n",
       "                    }\n",
       "                }\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"data\": []\n",
       "            },\n",
       "            \"seriesId\": 7265617\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12,\n",
       "                \"color\": \"#333\"\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"backgroundColor\": \"#fff\",\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"interval\": \"auto\",\n",
       "                \"rotate\": 30,\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 11,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"data\": [\n",
       "                \"iPhone\\u5ba2\\u6237\\u7aef\",\n",
       "                \"Android\",\n",
       "                \"\\u660e\\u661f\\u52bf\\u529b\\u699c\",\n",
       "                \"vivo\\u667a\\u80fd\\u624b\\u673a\",\n",
       "                \"vivo X23\\u5168\\u606f\\u5e7b\\u5f69\",\n",
       "                \"OPPO\\u667a\\u80fd\\u624b\\u673a\",\n",
       "                \"vivo X23 AI\\u975e\\u51e1\\u6444\\u5f71\",\n",
       "                \"\\u5c0f\\u7c73\\u624b\\u673a4\",\n",
       "                \"\\u7ea2\\u7c73Redmi\",\n",
       "                \"Android\\u5ba2\\u6237\\u7aef\"\n",
       "            ],\n",
       "            \"type\": \"category\"\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"name\": \"\",\n",
       "            \"show\": true,\n",
       "            \"nameLocation\": \"middle\",\n",
       "            \"nameGap\": 25,\n",
       "            \"nameTextStyle\": {\n",
       "                \"fontSize\": 14\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"formatter\": \"{value} \",\n",
       "                \"rotate\": 0,\n",
       "                \"interval\": \"auto\",\n",
       "                \"margin\": 8,\n",
       "                \"textStyle\": {\n",
       "                    \"fontSize\": 14,\n",
       "                    \"color\": \"#000\"\n",
       "                }\n",
       "            },\n",
       "            \"axisTick\": {\n",
       "                \"alignWithLabel\": false\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": null,\n",
       "            \"boundaryGap\": true,\n",
       "            \"min\": null,\n",
       "            \"max\": null,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"type\": \"value\"\n",
       "        }\n",
       "    ],\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_3a6ee7b6de034aef82d7cf8404adf62f.setOption(option_3a6ee7b6de034aef82d7cf8404adf62f);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.bar.Bar at 0x1214dedd8>"
      ]
     },
     "execution_count": 295,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bar = Bar(\"蔡徐坤真粉丝Top10转发设备\", width = 600,height=600)\n",
    "bar.add(\"\", true_source.index, true_source.values, is_stack=True, \n",
    "       xaxis_label_textsize=11, yaxis_label_textsize=14, is_label_show=True, xaxis_rotate=30)\n",
    "bar"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 296,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "222.0597165991903"
      ]
     },
     "execution_count": 296,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_true['user.follow_count'].mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 298,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "178.9480913823019"
      ]
     },
     "execution_count": 298,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_true['user.followers_count'].mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 302,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "90060    complemehtht_16690\n",
       "51426                 82号甜七\n",
       "75569             August菜包包\n",
       "33191           薄荷般的夏天_你的时代\n",
       "92003          Amygirl_P的坤坤\n",
       "Name: user.screen_name, dtype: object"
      ]
     },
     "execution_count": 302,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_true.sample(5)['user.screen_name']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 303,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3153"
      ]
     },
     "execution_count": 303,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_true['user.screen_name'].str.contains('蔡|坤|葵|kun').sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 304,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "6916"
      ]
     },
     "execution_count": 304,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_true.shape[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 305,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Building prefix dict from the default dictionary ...\n",
      "Dumping model to file cache /var/folders/mc/k6p_zt453w770h63024z__vw0000gn/T/jieba.cache\n",
      "Loading model cost 1.634 seconds.\n",
      "Prefix dict has been built succesfully.\n"
     ]
    }
   ],
   "source": [
    "# 绘制蔡徐坤真粉丝的简介词云图\n",
    "import jieba\n",
    "from collections import Counter\n",
    "from pyecharts import WordCloud\n",
    "\n",
    "jieba.add_word('蔡徐坤')\n",
    "\n",
    "swords = [x.strip() for x in open ('stopwords.txt')]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 308,
   "metadata": {},
   "outputs": [],
   "source": [
    "def plot_word_cloud(data, swords, columns):\n",
    "    text = ''.join(data[columns])\n",
    "    words = list(jieba.cut(text))\n",
    "    ex_sw_words = []\n",
    "    for word in words:\n",
    "        if len(word)>1 and (word not in swords):\n",
    "            ex_sw_words.append(word)\n",
    "    c = Counter()\n",
    "    c = Counter(ex_sw_words)\n",
    "    wc_data = pd.DataFrame({'word':list(c.keys()), 'counts':list(c.values())}).sort_values(by='counts', ascending=False).head(100)\n",
    "    wordcloud = WordCloud(width=1300, height=620)\n",
    "    wordcloud.add(\"\", wc_data['word'], wc_data['counts'], word_size_range=[20, 100])\n",
    "    return wordcloud"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 309,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min', 'wordcloud': '/nbextensions/echarts/echarts-wordcloud.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"d3d393895bf740e5b8fffc9b68016313\" style=\"width:1300px;height:620px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts', 'wordcloud'], function(echarts) {\n",
       "        \n",
       "var myChart_d3d393895bf740e5b8fffc9b68016313 = echarts.init(document.getElementById('d3d393895bf740e5b8fffc9b68016313'), null, {renderer: 'canvas'});\n",
       "var option_d3d393895bf740e5b8fffc9b68016313 = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\",\n",
       "            \"subtext\": \"\",\n",
       "            \"left\": \"auto\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#000\",\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"color\": \"#aaa\",\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u4e0b\\u8f7d\\u56fe\\u7247\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 7481583,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"formatter\": null,\n",
       "        \"textStyle\": {\n",
       "            \"color\": \"#fff\",\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"wordCloud\",\n",
       "            \"name\": \"\",\n",
       "            \"shape\": \"circle\",\n",
       "            \"rotationRange\": [\n",
       "                -90,\n",
       "                90\n",
       "            ],\n",
       "            \"rotationStep\": 45,\n",
       "            \"girdSize\": 20,\n",
       "            \"sizeRange\": [\n",
       "                20,\n",
       "                100\n",
       "            ],\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u8521\\u5f90\\u5764\",\n",
       "                    \"value\": 1088,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(37,42,14)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"ikun\",\n",
       "                    \"value\": 352,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(108,43,152)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"KUN\",\n",
       "                    \"value\": 242,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(14,9,130)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"amp\",\n",
       "                    \"value\": 224,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(48,87,135)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c0f\\u53f7\",\n",
       "                    \"value\": 199,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(10,150,118)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u82b1\\u82b1\\u4e16\\u754c\",\n",
       "                    \"value\": 191,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(86,20,114)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u559c\\u6b22\",\n",
       "                    \"value\": 180,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(37,44,15)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"IKUN\",\n",
       "                    \"value\": 171,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(27,108,94)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u552f\\u5764\",\n",
       "                    \"value\": 147,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(146,16,5)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u672a\\u6765\",\n",
       "                    \"value\": 137,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(156,96,140)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"kun\",\n",
       "                    \"value\": 130,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(125,6,8)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Ikun\",\n",
       "                    \"value\": 129,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(9,160,43)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9759\\u5b88\\u5df1\",\n",
       "                    \"value\": 127,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(2,147,141)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8fdc\\u822a\",\n",
       "                    \"value\": 103,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(153,70,60)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4f34\\u5764\",\n",
       "                    \"value\": 101,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(160,23,137)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u52aa\\u529b\",\n",
       "                    \"value\": 95,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(62,1,1)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u62ab\\u91d1\\u6210\",\n",
       "                    \"value\": 92,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(46,123,35)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u68a6\\u60f3\",\n",
       "                    \"value\": 84,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(61,119,133)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6570\\u636e\",\n",
       "                    \"value\": 81,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(117,104,24)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c38\\u8fdc\",\n",
       "                    \"value\": 81,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(19,30,97)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8f6e\\u535a\",\n",
       "                    \"value\": 78,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(73,12,24)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5fc5\\u56de\",\n",
       "                    \"value\": 77,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(97,50,158)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65f6\\u95f4\",\n",
       "                    \"value\": 76,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(104,76,19)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e92\\u7c89\",\n",
       "                    \"value\": 72,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(71,74,87)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c11\\u5e74\",\n",
       "                    \"value\": 70,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(1,34,41)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"for\",\n",
       "                    \"value\": 69,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(72,22,1)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8ffd\\u661f\",\n",
       "                    \"value\": 67,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(103,84,146)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u83dc\\u83dc\",\n",
       "                    \"value\": 67,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(85,64,16)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Kun\",\n",
       "                    \"value\": 63,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(42,41,127)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5feb\\u4e50\",\n",
       "                    \"value\": 60,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(3,147,138)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7231\\u5764\",\n",
       "                    \"value\": 60,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(143,70,20)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9759\\u5b88\",\n",
       "                    \"value\": 60,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(129,122,157)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"cp\",\n",
       "                    \"value\": 59,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(32,144,99)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5149\\u8292\",\n",
       "                    \"value\": 59,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(7,130,115)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8ffd\\u68a6\",\n",
       "                    \"value\": 57,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(135,89,90)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7b3c\\u7f69\",\n",
       "                    \"value\": 57,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(71,30,92)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7ec8\\u4f1a\",\n",
       "                    \"value\": 56,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(30,67,69)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e00\\u8d77\",\n",
       "                    \"value\": 55,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(28,49,4)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u81ea\\u7136\",\n",
       "                    \"value\": 54,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(110,29,27)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5df2\\u5fc3\",\n",
       "                    \"value\": 53,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(47,140,19)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5f90\\u5764\",\n",
       "                    \"value\": 53,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(71,157,98)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u591a\\u8a00\",\n",
       "                    \"value\": 53,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(108,44,142)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65e0\\u9700\",\n",
       "                    \"value\": 53,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(64,52,85)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u60a0\\u60a0\",\n",
       "                    \"value\": 52,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(156,63,100)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e4b\\u53e3\",\n",
       "                    \"value\": 52,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(58,12,79)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4f59\\u751f\",\n",
       "                    \"value\": 51,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(41,100,145)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d6e\\u534e\",\n",
       "                    \"value\": 51,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(124,88,123)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7231\\u5764\\u5764\",\n",
       "                    \"value\": 50,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(44,100,48)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65d7\\u4e0b\",\n",
       "                    \"value\": 49,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(59,122,46)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7b11\\u8c08\",\n",
       "                    \"value\": 49,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(107,85,142)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"is\",\n",
       "                    \"value\": 49,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(92,148,70)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"cxk\",\n",
       "                    \"value\": 47,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(12,105,98)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u731c\\u731c\",\n",
       "                    \"value\": 47,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(35,78,88)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u751f\\u6d3b\",\n",
       "                    \"value\": 47,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(110,11,20)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5931\\u7720\",\n",
       "                    \"value\": 47,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(145,151,92)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e00\\u679a\",\n",
       "                    \"value\": 46,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(88,41,35)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9047\\u89c1\",\n",
       "                    \"value\": 46,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(79,160,49)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u827a\\u4eba\",\n",
       "                    \"value\": 46,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(4,65,1)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"you\",\n",
       "                    \"value\": 45,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(87,98,91)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e00\\u8def\",\n",
       "                    \"value\": 45,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(48,91,156)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u552f\\u7231\\u5764\",\n",
       "                    \"value\": 44,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(68,27,131)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u604b\\u7231\",\n",
       "                    \"value\": 43,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(14,42,9)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u516c\\u53f8\",\n",
       "                    \"value\": 43,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(84,78,147)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u53ef\\u7231\",\n",
       "                    \"value\": 43,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(127,143,49)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7a33\\u5b9a\",\n",
       "                    \"value\": 42,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(120,33,157)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"the\",\n",
       "                    \"value\": 41,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(7,119,33)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u53ea\\u4e3a\",\n",
       "                    \"value\": 41,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(95,96,78)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8521\\u5148\\u751f\",\n",
       "                    \"value\": 41,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(75,51,16)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"be\",\n",
       "                    \"value\": 40,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(144,125,52)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6210\\u5458\",\n",
       "                    \"value\": 40,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(68,157,107)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e78\\u8fd0\",\n",
       "                    \"value\": 39,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(64,57,145)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"my\",\n",
       "                    \"value\": 39,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(12,116,83)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"ONLY\",\n",
       "                    \"value\": 39,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(55,2,102)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u966a\\u4f60\\u8d70\",\n",
       "                    \"value\": 39,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(3,136,41)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u552f\\u7c89\",\n",
       "                    \"value\": 37,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(1,72,158)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"your\",\n",
       "                    \"value\": 36,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(46,113,86)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6709\\u7c89\",\n",
       "                    \"value\": 36,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(59,78,78)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5343\\u519b\\u4e07\\u9a6c\",\n",
       "                    \"value\": 35,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(88,12,77)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"will\",\n",
       "                    \"value\": 35,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(50,19,34)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6218\\u6597\",\n",
       "                    \"value\": 34,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(118,34,98)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"need\",\n",
       "                    \"value\": 34,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(114,111,40)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b88\\u62a4\",\n",
       "                    \"value\": 34,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(95,135,139)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e95\\u7ebf\",\n",
       "                    \"value\": 34,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(94,118,46)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7ec4\\u5408\",\n",
       "                    \"value\": 34,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(123,108,98)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b9d\\u8d1d\",\n",
       "                    \"value\": 33,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(76,125,10)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"me\",\n",
       "                    \"value\": 33,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(54,154,12)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6211\\u4f1a\",\n",
       "                    \"value\": 32,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(47,104,46)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5f00\\u5fc3\",\n",
       "                    \"value\": 32,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(7,58,87)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u59d0\\u59d0\",\n",
       "                    \"value\": 32,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(142,156,126)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5fae\\u535a\",\n",
       "                    \"value\": 31,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(134,93,13)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e16\\u754c\",\n",
       "                    \"value\": 30,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(96,159,151)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e0c\\u671b\",\n",
       "                    \"value\": 30,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(47,69,111)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5f88\\u751c\",\n",
       "                    \"value\": 29,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(123,121,41)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"FOR\",\n",
       "                    \"value\": 28,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(30,96,104)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5f88\\u7d2f\",\n",
       "                    \"value\": 28,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(111,151,25)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c0f\\u732b\\u54aa\",\n",
       "                    \"value\": 28,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(102,72,143)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u76f8\\u9047\",\n",
       "                    \"value\": 28,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(145,51,41)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0d\\u8d1f\",\n",
       "                    \"value\": 28,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(13,122,112)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5a31\\u4e50\\u5708\",\n",
       "                    \"value\": 28,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(29,21,59)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u81ea\\u7531\",\n",
       "                    \"value\": 27,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(38,115,129)\"\n",
       "                        }\n",
       "                    }\n",
       "                }\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12,\n",
       "                \"color\": \"#333\"\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"backgroundColor\": \"#fff\",\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_d3d393895bf740e5b8fffc9b68016313.setOption(option_d3d393895bf740e5b8fffc9b68016313);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.wordcloud.WordCloud at 0x12152a6d8>"
      ]
     },
     "execution_count": 309,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "plot_word_cloud(data=data_true, swords=swords, columns='user.description')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 310,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts': '/nbextensions/echarts/echarts.min', 'wordcloud': '/nbextensions/echarts/echarts-wordcloud.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "    <div id=\"2992f2c2a05c4e86a9ef6c32287b9457\" style=\"width:1300px;height:620px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts', 'wordcloud'], function(echarts) {\n",
       "        \n",
       "var myChart_2992f2c2a05c4e86a9ef6c32287b9457 = echarts.init(document.getElementById('2992f2c2a05c4e86a9ef6c32287b9457'), null, {renderer: 'canvas'});\n",
       "var option_2992f2c2a05c4e86a9ef6c32287b9457 = {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\",\n",
       "            \"subtext\": \"\",\n",
       "            \"left\": \"auto\",\n",
       "            \"top\": \"auto\",\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#000\",\n",
       "                \"fontSize\": 18\n",
       "            },\n",
       "            \"subtextStyle\": {\n",
       "                \"color\": \"#aaa\",\n",
       "                \"fontSize\": 12\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"top\": \"center\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u4e0b\\u8f7d\\u56fe\\u7247\"\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"series_id\": 8066295,\n",
       "    \"tooltip\": {\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"formatter\": null,\n",
       "        \"textStyle\": {\n",
       "            \"color\": \"#fff\",\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"backgroundColor\": \"rgba(50,50,50,0.7)\",\n",
       "        \"borderColor\": \"#333\",\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"wordCloud\",\n",
       "            \"name\": \"\",\n",
       "            \"shape\": \"circle\",\n",
       "            \"rotationRange\": [\n",
       "                -90,\n",
       "                90\n",
       "            ],\n",
       "            \"rotationStep\": 45,\n",
       "            \"girdSize\": 20,\n",
       "            \"sizeRange\": [\n",
       "                20,\n",
       "                100\n",
       "            ],\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u8521\\u5f90\\u5764\",\n",
       "                    \"value\": 12685,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(155,159,118)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e16\\u754c\",\n",
       "                    \"value\": 4141,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(66,61,67)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u770b\\u89c1\",\n",
       "                    \"value\": 4072,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(157,80,37)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e1c\\u65b9\",\n",
       "                    \"value\": 4058,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(134,3,114)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u98ce\\u4e91\\u699c\",\n",
       "                    \"value\": 4057,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(104,4,111)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5343\\u5343\",\n",
       "                    \"value\": 2065,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(149,24,89)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b8c\\u6210\",\n",
       "                    \"value\": 1607,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(126,128,40)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8f6c\\u53d1\",\n",
       "                    \"value\": 1081,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(148,35,51)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5fae\\u535a\",\n",
       "                    \"value\": 1032,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(108,97,58)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7b11\\u54c8\\u54c8\",\n",
       "                    \"value\": 808,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(57,136,110)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u518d\\u89c1\",\n",
       "                    \"value\": 740,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(117,86,49)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u660e\\u661f\",\n",
       "                    \"value\": 719,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(68,8,45)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"cxk\",\n",
       "                    \"value\": 714,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(84,85,114)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e00\\u8d77\",\n",
       "                    \"value\": 704,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(72,49,67)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c38\\u8fdc\",\n",
       "                    \"value\": 694,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(60,65,63)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u652f\\u6301\",\n",
       "                    \"value\": 665,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(144,13,6)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u62ff\\u4e0b\",\n",
       "                    \"value\": 658,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(71,28,29)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7b2c\\u4e00\\u540d\",\n",
       "                    \"value\": 658,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(64,39,112)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u52bf\\u529b\",\n",
       "                    \"value\": 658,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(99,77,95)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u53ef\\u7231\",\n",
       "                    \"value\": 594,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(58,54,104)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u54c8\\u54c8\\u54c8\",\n",
       "                    \"value\": 570,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(47,122,25)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8d85\\u8bdd\",\n",
       "                    \"value\": 548,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(27,141,106)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5065\\u5eb7\",\n",
       "                    \"value\": 472,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(25,140,9)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6210\\u957f\",\n",
       "                    \"value\": 465,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(97,74,53)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e00\\u5b9a\",\n",
       "                    \"value\": 437,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(71,140,110)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u540e\\u63f4\\u4f1a\",\n",
       "                    \"value\": 433,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(136,32,54)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4eb2\\u4eb2\",\n",
       "                    \"value\": 423,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(1,0,151)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e29\\u6696\",\n",
       "                    \"value\": 417,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(80,84,113)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b9d\\u8d1d\",\n",
       "                    \"value\": 395,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(97,92,66)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6b63\\u5bab\",\n",
       "                    \"value\": 394,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(17,63,143)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e0c\\u671b\",\n",
       "                    \"value\": 382,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(82,156,84)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u821e\\u53f0\",\n",
       "                    \"value\": 348,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(72,0,160)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u80fd\\u91cf\",\n",
       "                    \"value\": 344,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(128,125,153)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5076\\u50cf\",\n",
       "                    \"value\": 312,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(77,39,86)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u52a8\\u7269\",\n",
       "                    \"value\": 311,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(26,47,69)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u597d\\u542c\",\n",
       "                    \"value\": 303,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(103,71,11)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5065\\u5eb7\\u6210\\u957f\",\n",
       "                    \"value\": 270,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(60,35,103)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8f6c\\u5708\\u5708\",\n",
       "                    \"value\": 269,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(63,30,124)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"August\",\n",
       "                    \"value\": 264,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(136,123,11)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6f02\\u4eae\",\n",
       "                    \"value\": 256,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(125,14,134)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e07\\u82b1\\u7b52\",\n",
       "                    \"value\": 256,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(22,101,135)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u559c\\u6b22\",\n",
       "                    \"value\": 251,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(150,69,12)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"ikun\",\n",
       "                    \"value\": 231,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(75,50,147)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u54e5\\u54e5\",\n",
       "                    \"value\": 220,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(6,63,89)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5f00\\u5fc3\",\n",
       "                    \"value\": 211,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(8,37,112)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c0f\\u5fc3\",\n",
       "                    \"value\": 206,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(33,29,81)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u52a0\\u6cb9\",\n",
       "                    \"value\": 196,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(114,138,14)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7eaf\\u7c89\",\n",
       "                    \"value\": 180,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(50,17,81)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e29\\u67d4\",\n",
       "                    \"value\": 171,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(36,130,128)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"CXK\",\n",
       "                    \"value\": 167,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(59,54,12)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6bcf\\u4e2a\",\n",
       "                    \"value\": 148,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(123,69,98)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u665a\\u5b89\",\n",
       "                    \"value\": 143,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(101,135,76)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7f9e\\u55d2\",\n",
       "                    \"value\": 141,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(112,107,53)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"AK47\",\n",
       "                    \"value\": 134,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(2,11,96)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u597d\\u597d\",\n",
       "                    \"value\": 118,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(113,132,51)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7c73\\u5947\",\n",
       "                    \"value\": 116,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(102,92,74)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u521d\\u5fc3\",\n",
       "                    \"value\": 111,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(6,45,118)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u52aa\\u529b\",\n",
       "                    \"value\": 108,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(16,46,20)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7fc5\\u8180\",\n",
       "                    \"value\": 104,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(43,35,92)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"KUN\",\n",
       "                    \"value\": 104,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(147,114,57)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6728\\u9a6c\",\n",
       "                    \"value\": 103,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(79,45,113)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65cb\\u8f6c\",\n",
       "                    \"value\": 103,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(45,73,8)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65f6\\u95f4\",\n",
       "                    \"value\": 100,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(30,11,34)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0b\\u6b21\",\n",
       "                    \"value\": 99,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(100,156,117)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5ba0\\u7269\\u533b\\u9662\",\n",
       "                    \"value\": 99,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(62,144,82)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6709\\u7f18\",\n",
       "                    \"value\": 99,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(9,111,149)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Unity\",\n",
       "                    \"value\": 95,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(140,38,86)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56de\\u5fc6\",\n",
       "                    \"value\": 92,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(120,144,114)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"FANSCLUB2\",\n",
       "                    \"value\": 92,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(53,22,141)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u97f3\\u4e50\",\n",
       "                    \"value\": 91,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(48,159,92)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e26\\u6765\",\n",
       "                    \"value\": 88,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(146,41,147)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u611f\\u8c22\",\n",
       "                    \"value\": 88,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(67,135,131)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65e0\\u6cd5\",\n",
       "                    \"value\": 87,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(121,15,102)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u77ed\\u6682\",\n",
       "                    \"value\": 86,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(133,140,51)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7ec8\\u4e8e\",\n",
       "                    \"value\": 86,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(36,68,72)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5de5\\u4f5c\",\n",
       "                    \"value\": 86,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(115,96,34)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u76f8\\u5904\",\n",
       "                    \"value\": 85,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(11,155,24)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u96be\\u5fd8\",\n",
       "                    \"value\": 84,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(71,2,48)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"ONE\",\n",
       "                    \"value\": 84,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(130,11,107)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"BIUBIUBIUBIU\",\n",
       "                    \"value\": 81,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(32,136,23)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9c9c\\u82b1\",\n",
       "                    \"value\": 81,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(28,127,40)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e00\\u6bb5\",\n",
       "                    \"value\": 81,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(55,13,41)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7247\\u523b\",\n",
       "                    \"value\": 79,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(54,54,96)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"##\",\n",
       "                    \"value\": 79,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(142,29,145)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5fd9\\u788c\",\n",
       "                    \"value\": 78,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(128,141,0)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u83b7\\u5f97\",\n",
       "                    \"value\": 78,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(110,6,2)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5973\\u5b69\\u513f\",\n",
       "                    \"value\": 78,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(154,117,116)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u563b\\u563b\",\n",
       "                    \"value\": 78,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(26,1,47)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u517b\\u80b2\",\n",
       "                    \"value\": 77,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(82,61,127)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6170\\u85c9\",\n",
       "                    \"value\": 77,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(70,88,16)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c3e\\u58f0\",\n",
       "                    \"value\": 77,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(130,80,128)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6b65\\u5165\",\n",
       "                    \"value\": 77,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(75,150,111)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5fae\\u7b11\",\n",
       "                    \"value\": 76,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(66,79,77)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u751c\\u8475\",\n",
       "                    \"value\": 76,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(49,35,44)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5de5\\u4f5c\\u5ba4\",\n",
       "                    \"value\": 76,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(128,28,141)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8bb0\\u5f97\",\n",
       "                    \"value\": 74,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(112,8,122)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6bd4\\u5fc3\",\n",
       "                    \"value\": 70,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(121,82,112)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5154\\u5b50\",\n",
       "                    \"value\": 70,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(95,120,118)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65e9\\u5b89\",\n",
       "                    \"value\": 69,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(56,34,91)\"\n",
       "                        }\n",
       "                    }\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"kun\",\n",
       "                    \"value\": 69,\n",
       "                    \"textStyle\": {\n",
       "                        \"normal\": {\n",
       "                            \"color\": \"rgb(133,128,21)\"\n",
       "                        }\n",
       "                    }\n",
       "                }\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [],\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"show\": true,\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"top\",\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12,\n",
       "                \"color\": \"#333\"\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"backgroundColor\": \"#fff\",\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ]\n",
       "};\n",
       "myChart_2992f2c2a05c4e86a9ef6c32287b9457.setOption(option_2992f2c2a05c4e86a9ef6c32287b9457);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.wordcloud.WordCloud at 0x1214e9a58>"
      ]
     },
     "execution_count": 310,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "plot_word_cloud(data=data_true, swords=swords, columns='raw_text')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
